Hi,
I'm new to JSF and I'm having problems with validation with JSF and A4J.
I have a table that has an onRowClick event listener:
<a4j:region>
<rich:dataTable width="700" id="staffList" rows="4" columnClasses="col"
value="#{StaffAdminBean.staffList}"
var="staffMember">
<rich:columnGroup>
<h:column>
..
..
..
<a4j:support
event="onRowClick"
actionListener="#{StaffAdminBean.getStaffMemberForUpdate}"
reRender=" staffEditGrid1,
staffEditGrid2,">
<f:param name="updateStaffId" value="#{staffMember.id}"/>
</a4j:support>
</rich:dataTable>
</a4j:region>
This works fine... the action loads the staff member properties into a managed bean from the DB.
These bean properties are mapped to some entry fields and can then be edited for update.
This all works fine until there is a validation error in one of the update fields.
When this happens and I click on another entry in the row, the entry fields are NOT updated with the new Bean Properties.
ONLY the field that had the validation error is updated... the rest are stuck with the old values even though the listener action is updating the bean
properties that are declared in the value attributes of the entry fields.
Here is an example of one of the entry fields.
<h:panelGrid columns="3" cellpadding="5" id="staffEditGrid1">
<h:outputLabel for="nameInput">
<h:outputText value="Name: "/>
</h:outputLabel>
<h:inputText id="nameInput" value="#{StaffAdminBean.name}" size="40" required="true">
<f:validateLength minimum="5"/>
</h:inputText>
<rich:message for="nameInput"/>
Any help would be greatly appreciated as I've been trying to get this page working for the last 2 days :-(