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

Reply via email to