[
http://jira.jboss.com/jira/browse/JBSEAM-1598?page=comments#action_12368915 ]
Dan Allen commented on JBSEAM-1598:
-----------------------------------
Yeah, this issue has sort of evolved as we come to realize what we really need. I
propose
clearParameters="true"
So in seam-gen, you would have the following below the form (as an example usage):
<div class="actionButtons">
<h:commandButton id="search" value="Search"
action="/${listPageName}.xhtml"/>
<s:button value="Clear" action="/${listPageName}.xhtml"
clearParameters="true" />
</div>
If you decided on a new tag instead, it would be:
<div class="actionButtons">
<h:commandButton id="search" value="Search"
action="/${listPageName}.xhtml"/>
<s:clearButton value="Clear" action="/${listPageName}.xhtml"
/>
</div>
The result, of course, would be the same. Either way is fine with me.
Other names would include:
propogateParameters
dropParameters
s:clearButton/s:clearLink
-------------------------
Key: JBSEAM-1598
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1598
Project: JBoss Seam
Issue Type: Feature Request
Components: JSF
Affects Versions: 2.0.0.BETA1
Reporter: Dan Allen
Priority: Minor
Original Estimate: 30 minutes
Remaining Estimate: 30 minutes
The search is a very nice feature to have on the list pages generated by seam-gen, but I
have watched people (and struggled myself) with figuring out how to clear the current
filter. It is very annoying to have to manually erase all the values entered in the form
and then submit the form again once cleared. Far easier would be to have a Clear button
on this form.
The following button would do the trick.
<h:commandButton id="clear" value="Clear" onclick="for (var i
= 0, len = this.form.length; i < len; i++) { if (this.form[i].type ==
'text') { this.form[i].value = ''; } }"
action="/${listPageName}.xhtml"/>
I will admit that the JavaScript is a little hacky, but it gets the point across. Feel
free to refine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira