What's the best way to handle embedded parameters in a dynamically generated
form action?
I have an ActionBean with a url binding like this:
@UrlBinding("/quest/{challengeName}/{toolName}/{questName}/{$event}")
It has 3 embedded parameters and an event name.
Then in my jsp I have: <s:form action="${actionBean.url}">. I dynamically
generate a new url in the ActionBean getUrl() method that looks like
"/quest/challenge1/tool1/quest1". Then a form button determines the event
to call on the ActionBean referenced by the above url.
When the jsp renders, the url is truncated to action="/quest". How can I
get the url to retain all the parameters?
This issue is related to
http://www.nabble.com/Pretty-URL-form-action%3D%22%22-and-required-parameters-issues-td12920339.html#a12923917.
But after reading that thread, I still wasn't sure what the best solution
is. (Also that thread is from over a year ago, so I thought maybe things
had changed.)
This issue is also related to an open issue:
http://www.stripesframework.org/jira/browse/STS-606.
One solution is to do something like:
<s:form action="${actionBean.url}">
<s:hidden name="challengeName" />
<s:hidden name="toolName" />
<s:hidden name="questName" /> ...
but that's cumbersome. Is there an automatic way to accomplish this with a
custom tag or something similar?
Another solution is to use query parameters in the s:form action, like:
/quest?challengeName=challenge1&toolName=tool1&questName=quest1
but then I lose the ability to bind different ActionBeans to subpaths of the
url in the future.
It sounds from the discussion of issue sts606 above that there's no current
way just to get Stripes to honor the full url set in the form's action
attribute. What's the best alternative?
I'm new to both Stripes and jsp taglibs. Thanks for any ideas,
Peter
--
View this message in context:
http://www.nabble.com/form-action-embedded-parameters-tp22066427p22066427.html
Sent from the stripes-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users