Want a JSP to know its placement in tiles-def.xml and to be able to pass parameters from tiles-def.xml
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sushil_Vegad
Posted On:   Thursday, June 30, 2005 09:51 AM

Hi, We are using tiles. My tiles-def.xml looks something like this: I want to be able to do 3 things: 1) article1.jsp to know that it is placed in a region called 'leftTop' or 'leftMiddle' 2) article1.jsp to know that it is placed in a definition named 'win.def.left'. 3) pass some parameters to article1.jsp from this definition file itself. Does tiles pass this information to article1.jsp? Is there any way that I can pass parameters to the jsp? In article1.jsp, I retrieved the component definition like this: TagUtils.getComponentDefinition("windows.def.left   More>>


Hi,
We are using tiles. My tiles-def.xml looks something like this:



			









I want to be able to do 3 things:

1) article1.jsp to know that it is placed in a region called 'leftTop' or 'leftMiddle'

2) article1.jsp to know that it is placed in a definition named 'win.def.left'.

3) pass some parameters to article1.jsp from this definition file itself.



Does tiles pass this information to article1.jsp? Is there any way that I can pass parameters to the jsp?



In article1.jsp, I retrieved the component definition like this:

			
TagUtils.getComponentDefinition("windows.def.left",
pageContext);


but then I dont want to hard code the definition name in the jsp....

Any help is much appreciated. Thanks.
   <<Less

Re: Want a JSP to know its placement in tiles-def.xml and to be able to pass parameters from tiles-def.xml

Posted By:   alan_do  
Posted On:   Thursday, June 30, 2005 03:26 PM

this is a tough one...you may be able to use bean:struts to expose the configuration and get to the forward's path (the defintion) through the configuration object.


maybe there is another way to do, outside the box kinda thing, what you need to do. maybe if you can explain what your requirements are there may be another solution? -/a

About | Sitemap | Contact