Skip to content

Instantly share code, notes, and snippets.

@tvd12
Last active April 10, 2024 06:45
Show Gist options
  • Save tvd12/5e1bff9ece124cb7a5e65dfe351ecb0a to your computer and use it in GitHub Desktop.
Save tvd12/5e1bff9ece124cb7a5e65dfe351ecb0a to your computer and use it in GitHub Desktop.
Luatvicca HomeController
package vn.luatvicca.website.web.controller.view;
import static org.youngmonkeys.ezyplatform.constant.CommonConstants.VIEW_VARIABLE_PAGE_TITLE;
import com.tvd12.ezyfox.collect.Lists;
import com.tvd12.ezyfox.util.EzyMapBuilder;
import com.tvd12.ezyhttp.server.core.annotation.DoGet;
import com.tvd12.ezyhttp.server.core.view.View;
public class HomeController {
@DoGet("/")
public View home() {
return View.builder()
.template("home")
.addVariable(
VIEW_VARIABLE_PAGE_TITLE,
"home"
)
.addVariable(
"teamMembers",
Lists.newArrayList(
EzyMapBuilder
.mapBuilder()
.put("displayName", "Hoang Thuong Ha")
.put("title", "Giam Doc Luat Su")
.put("coverImageUrl", "/images/a.png")
.toMap(),
EzyMapBuilder
.mapBuilder()
.put("displayName", "Hoang Thuong Ha")
.put("title", "Giam Doc Luat Su")
.put("coverImageUrl", "/images/a.png")
.toMap(),
EzyMapBuilder
.mapBuilder()
.put("displayName", "Hoang Thuong Ha")
.put("title", "Giam Doc Luat Su")
.put("coverImageUrl", "/images/a.png")
.toMap(),
EzyMapBuilder
.mapBuilder()
.put("displayName", "Hoang Thuong Ha")
.put("title", "Giam Doc Luat Su")
.put("coverImageUrl", "/images/a.png")
.toMap()
)
)
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment