Have you looked at IValidationDelegate? You can extend
ValidationDelegate and override methods such as writeSuffix to add
error messages around where the field is rendered. This will work out
of the box for the fields you mentioned that already support
validation. For checkboxes, radio, and list boxes you can create your
own components that support validation and work with this framework
(IMHO these should be part of the framework even if they are not the
common case just for consistency).

Ryan

On 2/1/06, Christian Mittendorf <[EMAIL PROTECTED]> wrote:
> Am 01.02.2006 um 01:56 schrieb Christian Mittendorf:
> > That might be a solution: do ValidPropertySelection and
> > ValidCheckbox record their input values to the ValidationDelegate
> > in any case, even if no error occured?
>
> Thanks for the hints!
>
> I've implemented both classes and added the following code:
>
> rotected void rewindFormComponent(IMarkupWriter writer, IRequestCycle
> cycle)
> {
> [...]
> IValidationDelegate delegate = getForm().getDelegate();
> if(delegate != null)
> {
>         delegate.recordFieldInputValue(value);
> }
> [...]
>
> Now every input value is also stored in the FieldTrackings and every
> validated FormField
> is on the list, wether it stores an error or not.
>
> Is there a reason why this is not the "normal" behaviour of these
> standard components?
>
> Christian
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to