True, it does not work.

Sorry, I should have tested in advance.

--
Samuel Santos
http://www.samaxes.com/


On Tue, Sep 7, 2010 at 3:47 PM, Gerardo Corro <rob_gar_...@hotmail.com>wrote:

>  Hi,
>
> No, it does not work, you cannot change a final value.
>
> BR
>
> ------------------------------
> Date: Tue, 7 Sep 2010 16:42:51 +0200
> From: g...@karko.net
> To: stripes-users@lists.sourceforge.net
> Subject: Re: [Stripes-users] Validation settings changed at runtime
>
>
> Will it will be possible to change final variable's value?
>
>
> W dniu 07.09.2010 16:38, Samuel Santos pisze:
>
> I definitivly like the @ValidationMethod better, but you can do something
> like this:
>
> protected final int MAX_VALUE = 9999;
>
> @Validate(required = true, minvalue = 1900, maxvalue = MAX_VALUE)
> private int birthyear;
>
> {
>     MAX_VALUE = Calendar.getInstance().get(Calendar.YEAR);
> }
>
> or
>
> protected final int MAX_VALUE = 9999;
>
> @Validate(required = true, minvalue = 1900, maxvalue = MAX_VALUE)
> private int birthyear;
>
> public BaseActionBean() {
>     MAX_VALUE = Calendar.getInstance().get(Calendar.YEAR);
> }
>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by: Show off your parallel
> programming skills. Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
>
> _______________________________________________ Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to