[
http://www.stripesframework.org/jira/browse/STS-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12365#comment-12365
]
Carl Krig commented on STS-839:
-------------------------------
Yeah, an addSourcePage attribute to <stripes:form> tag would do it, with the
default value of "true" independant (my 2c) of method just to keep things plain
and simple, and if explicitly set "false" should cause all (both) automatically
generated hidden fields _sourcePage and __fp be gone. (Omitting _sourcePage
alone leaving __fp would not make sense for above use case.)
In the meantime, yes you are right, did not occur to me I could
getElementXX()..removeChild(). Thnx!
> Make hidden fields (_sourcePage, __fb) optional for GET-forms
> -------------------------------------------------------------
>
> Key: STS-839
> URL: http://www.stripesframework.org/jira/browse/STS-839
> Project: Stripes
> Issue Type: Improvement
> Components: Tag Library
> Affects Versions: Release 1.5.6
> Reporter: Carl Krig
> Priority: Minor
> Labels: CleanURLs, form
>
> Use case; trivial page browsing form as part of a bigger screen
> ...
> Page
> <stripes:form action="/browser" method="get" style="display: inline;">
> <stripes:param name="some" />
> <stripes:param name="other" />
> <stripes:text name="pageNumber" onkeypress="javascript:if
> (window.event.keycode == 13 || event.which) this.parent.submit();">
> </stripes:form>
> of ${actionBean.pageCount}
> ...
> Problems;
> * GET puts the two hidden fields _sourcePage, __fb in the face of the user
> for no practical purpose
> * POST has the known refresh-side-effect (pressing F5 gives the user the
> popup asking permission to re-post)
> * The url is baked (has a @UrlBinding) so the stripes:param tags are really
> valuable to avoid hard-coding the recipe in multiple places, so substituting
> with a plain <form> tag is out of the question.
> Wish;
> It would be nice to have something like partial="true" that omits the hidden
> fields but still outputs the form tag.
> Suggestion 1: Add plain="true" with suggested functionality (Drawback:
> stacking yet another attribute on there)
> Suggestion 2: Make method="get" omit the hidden fields. (Drawback: might
> break existing code out there)
> Suggestion 3: Make method="get-funky" omit the hidden fields and output
> method="get". (Drawback: non-standard)
> Workaround is to go with the default method POST and add to the action code;
> if ("POST".equals(getContext().getRequest().getMethod())) {
> return new RedirectResolution(getClass()).addParameter("some",
> some).addParameter("other", other).addParameter("pageNumber", pageNumber);
> }
> Drawback with this workaround is of course the extra roundtrip just to hide
> nonsense query parameters.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development