Last active
April 10, 2024 06:45
-
-
Save tvd12/5e1bff9ece124cb7a5e65dfe351ecb0a to your computer and use it in GitHub Desktop.
Luatvicca HomeController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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