Re: Question about the API of Validation

2011-07-27 Thread Adolfo Panizo Touzon
Ok. Thanks for the info.

Regards.

2011/7/26 Nick Chalko 

> Remember
> @Valid
> Foo foo.
>
> Just recurses into foo calling the Validator on it.
>
> @Valid
> Integer int.
> at best will do nothing because the Integer class has no constraints.
>
> @Valid is made for your classes that you have put constraints on.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>



-- 
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Question about the API of Validation

2011-07-26 Thread Nick Chalko
Remember
@Valid
Foo foo.

Just recurses into foo calling the Validator on it.

@Valid
Integer int.
at best will do nothing because the Integer class has no constraints.

@Valid is made for your classes that you have put constraints on.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Question about the API of Validation

2011-07-26 Thread Adolfo Panizo Touzon
Solved.

The problem is in the @Valid constraint (the validator of that constraint
doesn´t allow parameterizeds types belonging to the package java.util).

I use @Size and works perfectly.

Thanks.

2011/7/22 Adolfo Panizo Touzon 

> Ok.
> I have two simple class: Person and Email.
>
> Also I´m  using the api of validation that includes in the gwt-2.4.0, and
> the configuration of the module is correct (because if I comment the @Valid
> contraints the code works well).
>
> The Person class class has some fields that belong to the java package 
> java.util
> and are annotated with the @Valid constraint.
>
> *class Person{*
> *
> *
>
> *//Works fine*
>
> *
> @Valid
> private HashMap codigos;
>
> //Not work.
> @Valid
> private HashMap> movidas;
>
> //Works fine
> @Valid
> private ArrayList mails;
> *
>
> *}*
>
> Finally the code that raise the exception are:
>
> *public class GenValGui implements EntryPoint {*
> * public void onModuleLoad() {*
>  Validator validator =
> Validation.buildDefaultValidatorFactory().getValidator();
> ErrMessagePanel emp =new ErrMessagePanel();
>  Person p = new Person(..);
>  *validator.validate(p, Default.class);*
> *}*
> *}*
>
> The deduction of this behavior is logic, the validation api does not allow
>  validate nested java.util fields like *ArrayList<**ArrayList>.*
>
> My question is that if in the future will be allowed or a restriction that
>  must always be so.
>
> Thank you very much for answering and if I have not explained well or you
> need more information, let me know.
>
> Thanks.
>
> Adolfo.
>
> 2011/7/22 Nick Chalko 
>
>>
>>
>> On Thu, Jul 21, 2011 at 2:45 AM, Adolfo Panizo Touzon <
>> adolfo.pan...@gmail.com> wrote:
>>
>>> As I said in another email I'm working with gwt api validation.
>>>
>>> Now I'm doing some tests, it is still not allowed the validation of
>>> fields belonging to the package java.util with @Valid constraint.
>>>
>>>
>> Can you show the code you have that fails.
>>
>> You might also try the GWT 2.4 beta it includes Validation see
>> http://code.google.com/p/google-web-toolkit/wiki/BeanValidation.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>
>
> --
> El precio es lo que pagas. El valor es lo que recibes.
> Warren Buffet
>



-- 
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Question about the API of Validation

2011-07-22 Thread Adolfo Panizo Touzon
Ok.
I have two simple class: Person and Email.

Also I´m  using the api of validation that includes in the gwt-2.4.0, and
the configuration of the module is correct (because if I comment the @Valid
contraints the code works well).

The Person class class has some fields that belong to the java package
java.util
and are annotated with the @Valid constraint.

*class Person{*
*
*

*//Works fine*

*
@Valid
private HashMap codigos;

//Not work.
@Valid
private HashMap> movidas;

//Works fine
@Valid
private ArrayList mails;
*

*}*

Finally the code that raise the exception are:

*public class GenValGui implements EntryPoint {*
* public void onModuleLoad() {*
Validator validator =
Validation.buildDefaultValidatorFactory().getValidator();
ErrMessagePanel emp =new ErrMessagePanel();
 Person p = new Person(..);
 *validator.validate(p, Default.class);*
*}*
*}*

The deduction of this behavior is logic, the validation api does not allow
validate nested java.util fields like *ArrayList<**ArrayList>.*

My question is that if in the future will be allowed or a restriction that must
always be so.

Thank you very much for answering and if I have not explained well or you
need more information, let me know.

Thanks.

Adolfo.

2011/7/22 Nick Chalko 

>
>
> On Thu, Jul 21, 2011 at 2:45 AM, Adolfo Panizo Touzon <
> adolfo.pan...@gmail.com> wrote:
>
>> As I said in another email I'm working with gwt api validation.
>>
>> Now I'm doing some tests, it is still not allowed the validation of
>> fields belonging to the package java.util with @Valid constraint.
>>
>>
> Can you show the code you have that fails.
>
> You might also try the GWT 2.4 beta it includes Validation see
> http://code.google.com/p/google-web-toolkit/wiki/BeanValidation.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>



-- 
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Question about the API of Validation

2011-07-22 Thread Nick Chalko
On Thu, Jul 21, 2011 at 2:45 AM, Adolfo Panizo Touzon <
adolfo.pan...@gmail.com> wrote:

> As I said in another email I'm working with gwt api validation.
>
> Now I'm doing some tests, it is still not allowed the validation of fields
>  belonging to the package java.util with @Valid constraint.
>
>
Can you show the code you have that fails.

You might also try the GWT 2.4 beta it includes Validation see
http://code.google.com/p/google-web-toolkit/wiki/BeanValidation.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Question about the API of Validation

2011-07-21 Thread Adolfo Panizo Touzon
As I said in another email I'm working with gwt api validation.

Now I'm doing some tests, it is still not allowed the validation of fields
belonging to the package java.util with @Valid constraint.

Associate the exception:
Caused by: java.lang.SecurityException: Prohibited package name: java.util
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1078)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
com.google.genvalgui.client.GwtValidatorImpl.validate(GwtValidatorImpl.java:224)

*For when** will be available? Does anyone have some information?*

Thanks!.


-- 
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.