Adding dynamic parameters to s:url
Greetings to all. I am trying to store dynamic parameters through requests. So, I have a class like this: public class WebParameter { private String name; private String value; } and in my Action class I have: private ListWebParameter webParameters; then I would like to do something like this in the JSP s:url id=theURL namespace=theNamespace action=theActionName s:iterator value=webParameters s:param name=%{name} value=%{value} / /s:iterator /s:url I can assure that webParameters is in the request scope, because I can iterate over it in a different place in the JSP and get the correct values. But inside s:url tab, no parameters are actually added. How can I achieve this? Thanks a lot, Felipe PS: All getters and setters are there in the code, but were ommited in this e-mail. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Adding dynamic parameters to s:url
try adding *status=webP *in the s:iterator and use: s:param name=*#webP.name* value=*#webP.value* / Regards, - Girish Naik Mobile:-+91-09740091638 girish.n...@gmail.com George Bernard Shawhttp://www.brainyquote.com/quotes/authors/g/george_bernard_shaw.html - A government that robs Peter to pay Paul can always depend on the support of Paul. On Tue, Jun 2, 2009 at 7:13 PM, Felipe Fraga felipefr...@gmail.com wrote: Greetings to all. I am trying to store dynamic parameters through requests. So, I have a class like this: public class WebParameter { private String name; private String value; } and in my Action class I have: private ListWebParameter webParameters; then I would like to do something like this in the JSP s:url id=theURL namespace=theNamespace action=theActionName s:iterator value=webParameters s:param name=%{name} value=%{value} / /s:iterator /s:url I can assure that webParameters is in the request scope, because I can iterate over it in a different place in the JSP and get the correct values. But inside s:url tab, no parameters are actually added. How can I achieve this? Thanks a lot, Felipe PS: All getters and setters are there in the code, but were ommited in this e-mail. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Adding dynamic parameters to s:url
On Tue, Jun 2, 2009 at 9:59 AM, Girish Naik girish.n...@gmail.com wrote: try adding *status=webP *in the s:iterator and use: s:param name=*#webP.name* value=*#webP.value* / I think it is 'var=' not 'status=' -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Adding dynamic parameters to s:url
May be, but i have successfully used 'status=' in my project. Anyways why not try both n use the one which works ;) Regards, - Girish Naik Mobile:-+91-09740091638 girish.n...@gmail.com Mark Twain http://www.brainyquote.com/quotes/authors/m/mark_twain.html - There is no sadder sight than a young pessimist. On Tue, Jun 2, 2009 at 7:30 PM, Wes Wannemacher w...@wantii.com wrote: On Tue, Jun 2, 2009 at 9:59 AM, Girish Naik girish.n...@gmail.com wrote: try adding *status=webP *in the s:iterator and use: s:param name=*#webP.name* value=*#webP.value* / I think it is 'var=' not 'status=' -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Adding dynamic parameters to s:url
Girish Naik wrote: May be, but i have successfully used 'status=' in my project. Anyways why not try both n use the one which works ;) status is only the iterator status (with count, index, first, last, etc.) If it worked for you as the current iteration object then that's a very, very strange bug. If you could post code that uses the status attribute in this way we'd be interested in seeing what's broken. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Adding dynamic parameters to s:url
I had used it in the project, but since it was not working a colleague has changed it without my knowledge. Sorry to misguide as I thought it is working fine :( Regards, - Girish Naik Mobile:-+91-09740091638 girish.n...@gmail.com George Bernard Shawhttp://www.brainyquote.com/quotes/authors/g/george_bernard_shaw.html - A government that robs Peter to pay Paul can always depend on the support of Paul. On Tue, Jun 2, 2009 at 7:51 PM, Dave Newton newton.d...@yahoo.com wrote: Girish Naik wrote: May be, but i have successfully used 'status=' in my project. Anyways why not try both n use the one which works ;) status is only the iterator status (with count, index, first, last, etc.) If it worked for you as the current iteration object then that's a very, very strange bug. If you could post code that uses the status attribute in this way we'd be interested in seeing what's broken. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org