Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void execute(final Request tilesRequest, final AttributeContext attributeContext)
- throws PreparerException {
- attributeContext.putAttribute("myAttribute", new Attribute("hello")); //For starters put a simple string
- }
- <tiles:insertAttribute name="myAttribute"/>
- <definition name="template.main" template="/WEB-INF/jsp/templates/templateMain.jsp"
- preparer="com.ernyz.vacation.web.ViewPreparers.HeaderViewPreparer">
- <put-attribute name="header" value="/WEB-INF/jsp/components/header.jsp" />
- <put-attribute name="footer" value="/WEB-INF/jsp/components/footer.jsp" />
- </definition>
- <definition name="login" extends="template.main">
- <put-attribute name="header" value="/WEB-INF/jsp/login/loginPageHeader.jsp" />
- <put-attribute name="content" value="/WEB-INF/jsp/login/login.jsp" />
- </definition>
- <definition name="*" extends="template.main" preparer="com.ernyz.vacation.web.ViewPreparers.HeaderViewPreparer">
- <put-attribute name="header" value="/WEB-INF/jsp/components/header.jsp" />
- <put-attribute name="content" value="/WEB-INF/jsp/content/{1}.jsp" />
- </definition>
- <definition name="*/*" extends="template.main">
- <put-attribute name="header" value="/WEB-INF/jsp/components/header.jsp" />
- <put-attribute name="content" value="/WEB-INF/jsp/content/{1}/{2}.jsp" />
- </definition>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement