Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. public void execute(final Request tilesRequest, final AttributeContext attributeContext)
  2. throws PreparerException {
  3. attributeContext.putAttribute("myAttribute", new Attribute("hello")); //For starters put a simple string
  4. }
  5.  
  6. <tiles:insertAttribute name="myAttribute"/>
  7.  
  8. <definition name="template.main" template="/WEB-INF/jsp/templates/templateMain.jsp"
  9. preparer="com.ernyz.vacation.web.ViewPreparers.HeaderViewPreparer">
  10. <put-attribute name="header" value="/WEB-INF/jsp/components/header.jsp" />
  11. <put-attribute name="footer" value="/WEB-INF/jsp/components/footer.jsp" />
  12. </definition>
  13.  
  14. <definition name="login" extends="template.main">
  15. <put-attribute name="header" value="/WEB-INF/jsp/login/loginPageHeader.jsp" />
  16. <put-attribute name="content" value="/WEB-INF/jsp/login/login.jsp" />
  17.  
  18. </definition>
  19.  
  20. <definition name="*" extends="template.main" preparer="com.ernyz.vacation.web.ViewPreparers.HeaderViewPreparer">
  21. <put-attribute name="header" value="/WEB-INF/jsp/components/header.jsp" />
  22. <put-attribute name="content" value="/WEB-INF/jsp/content/{1}.jsp" />
  23. </definition>
  24.  
  25. <definition name="*/*" extends="template.main">
  26. <put-attribute name="header" value="/WEB-INF/jsp/components/header.jsp" />
  27. <put-attribute name="content" value="/WEB-INF/jsp/content/{1}/{2}.jsp" />
  28. </definition>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement