How to check whether a DataTable has one row to be selected?
Posted: 17 Nov 2010, 01:36
When click a button, how to check whether a DataTable has one row selected?
If there is one row selected, show a dialog; else show a message "please select one row".
But now, I write the code which was shown in
http://www.primefaces.org/showcase/ui/d ... Single.jsf (primefaces' showcase)
If there is not a row selected, the dialog will always be shown.
If there is one row selected, show a dialog; else show a message "please select one row".
But now, I write the code which was shown in
http://www.primefaces.org/showcase/ui/d ... Single.jsf (primefaces' showcase)
Code: Select all
<f:facet name="footer">
<p:commandButton value="View" image="ui-icon ui-icon-search"
update="form:display" oncomplete="carDialog.show()"/>
</f:facet>