Announcement Announcement Module
No announcement yet.
SpringFramework & Tiles design pattern for multiple controllers Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SpringFramework & Tiles design pattern for multiple controllers

    I am new in Tiles, and I like it.

    My problem is, that I got a head , body and footer tile in the template definition in SpringFramework. I would like to display some user information in head tile, and display last login ip in footer with some dynamic data. As I mean I can do that, if I assagn(addAttribute) every variable in every controller which use this template.

    Is there any way the head/footer tile ask data from there own spring Controller? Or how can I add information(variableValue) to head and footer tiles without repeating sourcecode in every controller.


  • #2
    I think you can add directly to your template page. It worked for me.
    Example, in layout.jsp template
    HTML Code:
    <header id="header">
    			<h1 class="site_title">Account Manager</h1>
    			<h2 class="module_title">
    				<tiles:insertAttribute name="title" ignore="true" />
    		<div class="user">
    			<a href="<c:url value="/j_spring_security_logout" />">Logout</a>
    			<a href="changePassword.htm">Change password</a>