We have recently added Shale validation to our JSF application. Generally implementation has been a simple process, however, we are having some problems with the auto-generated Javascript used for checking required fields inside a DataTable control.
Basically the datatable contains a list of items each with a simple inputText 'description' field that must be entered. On initial load of a page the generated JavaScript 'required' method contains the correct code and correctly validates that each row contains a description. Adding rows to the datatable also behaves with each newly added row added to the validation method and checked on submission of the form. Deleting items, however, is producing unexpected results with the deleted row correctly removed from the datatable but remaining referenced in the validation method. As a result attempts to submit the form cause the method to attempt validation of a field on a row that does not exist. Row deletion is performed using an actionListener call to a request based backing bean. This method removes the row from a collection stored in a separate session based backing bean that as I say results in the successful removal of the row from the generated DataTable on page reload. We are using Shale 1.0.3, Commons Validator 1.3.0 and MyFaces 1.1.2. Please let me know if anyone else has run into this problem and what we might be doing wrong. Regards Scott -- View this message in context: http://www.nabble.com/Required-field-validation-in-DataTable---invalid-rows-referenced-tf2416075.html#a6734747 Sent from the Shale - User mailing list archive at Nabble.com.
