|
Hi,
We have an application where users can add/remove rows in a table by pressing "add" and "remove" buttons.
Pressing.
E.g
...
<xforms:repeat nodeset="a:additionalCourses/a:additionalCourse"> <xforms:input ref="a:subject"> <xforms:label class="forms-hidden" value="$resources/subject" /> <xforms:alert value="$resources/alert/mandatoryValue" /> </xforms:input>
<fr:button> <xforms:label value="$resources/btns/removeBtn" /> <xforms:action ev:event="DOMActivate"> <xforms:delete nodeset="." /> </xforms:action> </fr:button>
</xforms:repeat> ...
The nodes that are added to the instance when a user presses "add" are bound to be required so if they have not been assigned values by the user (e.g a points for a new subject) the form validation stops the user from moving to the next view.
The problem is that if an user adds a new row and then deletes it the corresponding instance is correct (ie does not contain the new row) but the validation fails with a message like "subject points are required". If two new rows are added and deleted the error message will display two missing subject points.
It seems like the component tree on the server is not updated when the instance nodes have been deleted. I have tried different kinds of refreshes but nothing works.
Does anyone know how to fix this?
|