Am 04.02.2010 11:40, Stephan Windmüller wrote:

Of course, I could remember the control names of each Field. But how do
I restore the Field instance based on the control name? Is there a
service for this?

Okay, here is my solution for now:

I created a class SimpleField which implements the Field interface and has a public method for setting the control name.

The onValidateFrom-method for each field remembers the controlName for the checkbox in each row of the grid. Then I injected the SimpleField into the page. In onValidateForm I am iterating over all selected rows, setting the control name of the SimpleField to the remembered one and recording an error with it if needed.

Tapestry Developers, please:

- enable validation for checkBoxes. The simplest case I can imagine is a "required" validator when accepting licenses on web pages.

- Provide a way to retrieve single field instances from a loop or grid so that my above hack is not needed.

Regards
 Stephan

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

Reply via email to