I have been experimenting with using the AjaxFormLoop component, however,
I've run into a problem with displaying validation errors and I was hoping
someone could help me out.

My problem is that if additional rows are added to the form via the formloop
and the form is submitted with errors in these fields, when the form is
redisplayed, the new rows that were added are blank (i.e. have no values)
and aren't highlighted as being in error, although they are redisplayed.
This is as opposed to fields which are part of the form loop but which were
rendered by the initial page request.

The reason for this behaviour seems to be that the clientids change between
submission and response. I can see that the FormInjector is munging the ids
in json responses as each row gets added, to ensure uniqueness - which seems
reasonable - however, the exact details of how this bit of code works are
beyond comprehension by my tiny and inferior brain. And when the form gets
re-rendered to display the validation error messages, I can see that the
form fields have their ids assigned via RenderSupport, which delegates to
simple strategy of just appending "_<incrementing_number>" for duplicate
ids. So I think I understand roughly what's going wrong, but don't know how
to resolve it (another productive afternoon...)  

Has anyone else run into this problem before and had more success than me?
-- 
View this message in context: 
http://www.nabble.com/question-about-forminjector-and-client-ids-tp24793495p24793495.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to