Details
-
Enhancement
-
Resolution: Unresolved
-
Major
-
1.4.1.Final
-
None
Description
At the moment, when you generate JSF pages, the search.xhtml have a Search and a Create New button :
<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>
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 :
<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>
The bookBean.reset method could just do a new on example (or initialise with default values for example)