On Wed, Mar 12, 2008 at 4:17 AM, xianwinwin <[EMAIL PROTECTED]> wrote:
>
>  Thanks Ealden, this was very helpful!
>
>  I tried that and it works fine.
>
>  Question, say I wish to check for a date, so far I've been doing it this
>  way:
>  example
>
>  private Date delta;
>
>         
> @TypeConversion(converter="com.utilities.conversion.DateTypeConversion")
>         public void setDelta(Date delta)
>         {
>                 this.delta = delta;
>         }
>
>  Obviously the I created the converter. How can I incorporate this
>  TypeConversion into the Action Annotation (say to field registration.dob)?
>
>   @Validations(...what comes here.???...)
>  public String save()
>  {
>    //some code
>  }
>

Xianwinwin,

There should be a conversion error interceptor in, say, defaultStack,
that prompts the user if a conversion fails such as when the date
entered is not correct.  A case that needs to be handled though is if
the user didn't enter any date at all which doesn't seem to cause a
conversion error.  Since you are using a custom type converter I
suppose you can catch this case.

Thanks

-- 
Ealden Esto E. Escañan
http://blog.ealden.net

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

Reply via email to