[ http://mc4j.org/jira/browse/STS-401?page=comments#action_10746 ]
Jeff Ferber commented on STS-401:
---------------------------------
Not really, because params embedded in the link need to be known before the
form tag is printed. Even if you add a new type of attrib to the form tag, it
doesn't solve the main issue: other params that are included in the request
are being ignored if the action bean expects them in the URL.
Instead, how about checking to see if they're present in a request param if
missing from the url?
For example, say you have:
@UrlBinding("/avacados/are/{description}")
The form posts to action="/avacados/are"
The action bean says, hey, 'description' is missing. Let's see if it's in the
paramMap. Yep, there it is, description[0]="radioactive"
> form tags don't work with clean urls
> ------------------------------------
>
> Key: STS-401
> URL: http://mc4j.org/jira/browse/STS-401
> Project: Stripes
> Issue Type: Bug
> Components: ActionBean Dispatching
> Affects Versions: Release 1.5
> Environment: Stripes 1.5-trunk r593
> Reporter: Jeff Ferber
> Assigned To: Ben Gunter
>
> When using the stripes form tag's 'beanclass' attrib to post to a clean url,
> params and events embedded in the URL are lost.
> Here's an example (freemarker):
> [EMAIL PROTECTED]
> beanclass="com.path.MyAction"
> name="aForm"]
> ....
> [EMAIL PROTECTED] name="doSpecialStuff" value="url binding rocks" /]
> [/@s.form]
> Any sort of clean URL kills the form.
> // this works- @UrlBinding("/innocent/little/form")
> // this doesn't work-
> @UrlBinding("/innocent/little/form/{anotherParam}")
> public class MyAction extends BaseActionBean
> { ... }
> Both generate an html tag pointing to the same place:
> action="/innocent/little/form"
> anotherParam is included in a hidden input.
> You may ask, "why do you care about clean URLs with post data?
> A fair question... I sometimes have forms post back to the same page. So the
> user sees the URL on the original page and for validation errors. Also,
> some (not me) might set forms to submit via GET.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development