This content has been marked as final.
Show 1 reply
-
1. Re: Validate extendedDataTable selection
ibstmt Oct 17, 2011 1:47 PM (in response to atharumar)You can do a test in your onClick and onComplete expressions:
<a4j:commandButton value="OK" reRender="nextPanel"
action="#{userBean.takeSelection}"
onclick="if (#{userBean.rowSelected}) #{rich:component('thisPanel')}.hide()"
oncomplete="if (#{userBean.rowSelected}) #{rich:component('nextPanel')}.show()"
styleClass="formButtonClass" />
... where you have a isRowSelected method in your bean that returns true if a row was selected. If a row wasn't selected, that same method can generate a message for the user.