aspose file tools*
The moose likes Struts and the fly likes Is it possible to have dynamic values in tiles.xml in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Is it possible to have dynamic values in tiles.xml in Struts2" Watch "Is it possible to have dynamic values in tiles.xml in Struts2" New topic
Author

Is it possible to have dynamic values in tiles.xml in Struts2

Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
Hi,

Is it possible to pass dynamic values in tiles.xml as we do in struts.xml in Struts2? I have used ${parameter} to get dynamic values in config file but it doesnt seem to work. Any ideas?

Thanks
Anil
Niiraj Patel
Ranch Hand

Joined: Sep 17, 2011
Posts: 47
Anil,
Can you tell how do you set dynamic value in config file by providing code.

So, other can understand your point.

-Niraj
Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
I have set the parameter value using getter/setter in the interceptor and then in the tiles I used the following

<definition name="online.template" template="brand.jsp">
<put-attribute name="header" value="${id}/header.ftl"/>

Each client has different header files so I want to provide the id to direct to the right header. Is this possible or is there another way around?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to have dynamic values in tiles.xml in Struts2
 
Similar Threads
How do i change only body page in tiles.xml file in struts2
struts2
Struts2 and xslt
How to make the body dynamic in tiles (struts2)
Struts2 Double Select Tag