How to pass request default param to definition in index.jsp?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dustin_Breese
Posted On:   Sunday, January 19, 2003 05:47 AM

I have an index.jsp page. In the page, I simply want to call a definition and pass it a request param named "pageName". However, when the user first hits the webpage, there will be no request params. For example, index.jsp?pageName=test, is the ideal way of calling the page, but many times it will just be "index.jsp". I can't figure out a way to send a default request param to the definition so that the action form will have this value and therefore, the action can do the necessary processing. Does this make sense? In effect, I wish there was some way to do this: {tiles:insert definition="content.display?pageName=test"/} but it t   More>>

I have an index.jsp page. In the page, I simply want to call a definition and pass it a request param named "pageName". However, when the user first hits the webpage, there will be no request params.


For example, index.jsp?pageName=test, is the ideal way of calling the page, but many times it will just be "index.jsp".


I can't figure out a way to send a default request param to the definition so that the action form will have this value and therefore, the action can do the necessary processing.


Does this make sense? In effect, I wish there was some way to do this:


{tiles:insert definition="content.display?pageName=test"/}


but it tries to find the definition named "content.display?pageName=test" instead of just "content.display".


I know I could create a new action such as "/content/display.do" and call it as "/content/display.do?pageName=test", but I'm just trying to understand how to pass default values to a definition.


Thanks in advance for your help,

Dustin

   <<Less

Re: How to pass request default param to definition in index.jsp?

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, January 21, 2003 06:49 AM

Whatever logic is going to use the value of the parameter, make it have a default if there is no such parameter.

About | Sitemap | Contact