What java class must the IValidationDelegate extend.
Should it be placed under the components package
How can we use this new validator in our pages

Petros


Martino Piccinato wrote:
> 
> Ok,
> 
> I reply to myself hoping this would be of any help for somebody else.
> Is as simple as to make your own IValidationDelegate and override
> (exemple)
> this method:
> 
> public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle,
>             IFormComponent component, IValidator validator) {
>         // If the form component represents a required field
>         // it adds the required field class
>         super.writeAttributes(writer, cycle,component,  validator);
>         if (component.isRequired()) {
>             writer.appendAttribute("class", "requiredField");
>         }
>     }
> 
> obviously then you have to use your IValidationDelegate in your
> pages/components.
> 
> 
> 
> On 3/23/07, Martino Piccinato <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> is there a "standard" way to define common formatting for required fields
>> BEFORE client/server side validation happens?
>> It's always a good thing for users to know compulsory fields before
>> starting data insertion.
>>
>> I know the issue is easy to solve just by adding few things but it would
>> be good to have this in componentes that accept "required" validator.
>>
>> Martino
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/required-fields-formatting-BEFORE-validation-tp9631849p16088778.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to