You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ashish Raniwala <ra...@hotmail.com> on 2005/11/28 22:31:04 UTC

Validation

Hi Guys,

This should be a trivial question.

How do we do validation on NON ValidField components? e.g. If I use Upload
component and want to validate if user has entered a file name or not. How
do I do this? 

One simple way could be to do serverside validation and have a message
property to show it if it is not null. Is this standard way? Or like
ValidField I can set the component on which validation message is thrown ?

Thanks,

Ashish

 


RE: Validation

Posted by Ashish Raniwala <ar...@gmail.com>.
Hi Guys,
In Tapestry 3, I do not see parameter Validator for Upload component though
I noticed that Tapestry 4 allows to add validator for Upload component.
As we are still on Tapestry 3, is there is way I can achieve similar
functionality?
Thanks,
Ashish


-----Original Message-----
From: Andreas Andreou [mailto:andyhot@di.uoa.gr] 
Sent: Tuesday, November 29, 2005 5:48 AM
To: Tapestry users
Subject: Re: Validation

Also check out this thread
http://thread.gmane.org/gmane.comp.java.tapestry.user/26820
It has a validator for filenames to be used with the Upload component

sreejith wrote:

> Hi Ashish ,
>    You can use validators on components like Fileupload also. Use the
> BaseValidator's required property on you component.
>
> Thanks
>
> Ashish Raniwala wrote:
>
>> Hi Guys,
>>
>> This should be a trivial question.
>>
>> How do we do validation on NON ValidField components? e.g. If I use
>> Upload
>> component and want to validate if user has entered a file name or
>> not. How
>> do I do this?
>> One simple way could be to do serverside validation and have a message
>> property to show it if it is not null. Is this standard way? Or like
>> ValidField I can set the component on which validation message is
>> thrown ?
>>
>> Thanks,
>>
>> Ashish
>>
>>
>>
>>
>>  
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Validation

Posted by Andreas Andreou <an...@di.uoa.gr>.
Also check out this thread
http://thread.gmane.org/gmane.comp.java.tapestry.user/26820
It has a validator for filenames to be used with the Upload component

sreejith wrote:

> Hi Ashish ,
>    You can use validators on components like Fileupload also. Use the
> BaseValidator's required property on you component.
>
> Thanks
>
> Ashish Raniwala wrote:
>
>> Hi Guys,
>>
>> This should be a trivial question.
>>
>> How do we do validation on NON ValidField components? e.g. If I use
>> Upload
>> component and want to validate if user has entered a file name or
>> not. How
>> do I do this?
>> One simple way could be to do serverside validation and have a message
>> property to show it if it is not null. Is this standard way? Or like
>> ValidField I can set the component on which validation message is
>> thrown ?
>>
>> Thanks,
>>
>> Ashish
>>
>>
>>
>>
>>  
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Validation

Posted by sreejith <sr...@x-minds.org>.
Hi Ashish ,
    You can use validators on components like Fileupload also. Use the 
BaseValidator's required property on you component.

Thanks

Ashish Raniwala wrote:

>Hi Guys,
>
>This should be a trivial question.
>
>How do we do validation on NON ValidField components? e.g. If I use Upload
>component and want to validate if user has entered a file name or not. How
>do I do this? 
>
>One simple way could be to do serverside validation and have a message
>property to show it if it is not null. Is this standard way? Or like
>ValidField I can set the component on which validation message is thrown ?
>
>Thanks,
>
>Ashish
>
> 
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Validation

Posted by sreejith <sr...@x-minds.org>.
Hi Ashish,   
   Use org.apache.tapestry.form.validator.Required on your component.
Thanks
*
*Ashish Raniwala wrote:

>Hi Guys,
>
>This should be a trivial question.
>
>How do we do validation on NON ValidField components? e.g. If I use Upload
>component and want to validate if user has entered a file name or not. How
>do I do this? 
>
>One simple way could be to do serverside validation and have a message
>property to show it if it is not null. Is this standard way? Or like
>ValidField I can set the component on which validation message is thrown ?
>
>Thanks,
>
>Ashish
>
> 
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org