]
George Gastaldi updated FORGE-1211:
-----------------------------------
Component/s: Scaffold
Adding a Reset button to the JSF search pages
---------------------------------------------
Key: FORGE-1211
URL:
https://issues.jboss.org/browse/FORGE-1211
Project: Forge
Issue Type: Enhancement
Components: Scaffold
Affects Versions: 1.4.1.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
At the moment, when you generate JSF pages, the search.xhtml have a Search and a Create
New button :
{code}
<h:panelGroup styleClass="buttons">
<h:commandLink value="Search" action="#{bookBean.paginate}"
styleClass="btn btn-primary"/>
<h:commandLink value="Create New" action="#{bookBean.create}"
styleClass="btn btn-primary"/>
</h:panelGroup>
{code}
With long search forms it would be handy to have a Reset button that would clear the
form. A simple {{<h:commandButton type="reset" />}} will not work, so you
would have to have an extra method that clears the {{example}}, something like :
{code}
<h:panelGroup styleClass="buttons">
<h:commandLink value="Search" action="#{bookBean.paginate}"
styleClass="btn btn-primary"/>
<h:commandLink value="Reset" action="#{bookBean.reset}"
styleClass="btn btn-primary"/>
<h:commandLink value="Create New" action="#{bookBean.create}"
styleClass="btn btn-primary"/>
</h:panelGroup>
{code}
The {{bookBean.reset}} method could just do a {{new}} on {{example}} (or initialise with
default values for example)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: