On Thu, 15 Nov 2012 09:55:15 -0200, nquirynen
<nat...@pensionarchitects.be> wrote:
- More client side validation feeling
- avoid unnecessary rerendering, database queries, etc.
- some elements in the zone that were visually altered with javascript
get reset to their initial state
- ...
In this case, you're going beyond what a Zone can do. Right now, Tapestry
doesn't have the support for what you want out-of-the-box. You'd need to
write some JavaScript code to do the AJAX form submission then, in the
server-side, get the error messages and their corresponding field ids,
return them in a JSONObject and show the validation errors yourself. Or
you could try to implement as much validation as possible client-side and
only trigger AJAX requests for validations that need to be done
server-side.
Zones are quite useful and can handle lots of AJAX situations very easily,
but, of course, it doesn't cover everything nor it should, as it would
need to be something very complex to write and use.
Now I add errors using Form.recordError(Field field, String
errorMessage) in the onValidate event method.
Then I hoped i could retrieve these errors and there accompanying Field.
But I only see Form.getDefaultTracker().getErrors() which returns just a
List<String> of the error messages.
Yeah, we could have an improvement here. Feel free to post a JIRA for that.
So I have no clue how to get a list of the needed fields to get their
id's.
Is this form created dinamically?
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org