GWT 2.5 Validation problem

105 views
Skip to first unread message

Daniel Mauricio Patino León

unread,
Nov 9, 2012, 3:47:40 PM11/9/12
to google-we...@googlegroups.com
I want to validate a child  Proxy (@Embeddable) on an EntityProxy with the new Validation frame work but i have a problem

The code looks some thing like this:

@ProxyFor(locator=BaseEntityLocator.class, value=Producto.class)
public interface ProductoProxy extends EntityProxy {

public void setInformacionAduanera(InformacionAduaneraProxy informacionAduanera);
@Valid
public InformacionAduaneraProxy getInformacionAduanera();
        ...
}

@ProxyFor(value=InformacionAduanera.class)
public interface InformacionAduaneraProxy extends ValueProxy {

@NotNull(message="notNull")
public Date getFecha();
}

On other part of the App

this.productoProxy = request.create(ProductoProxy.class);
informacionAduaneraProxy = request.create(InformacionAduaneraProxy.class);
this.productoProxy.setInformacionAduanera(informacionAduaneraProxy);

Then finally 

RequestContext r =  driver.flush();
Set contraints = Validation.buildDefaultValidatorFactory().getValidator().validate(productoProxy);

I expect the @Valid annotation on the Entity proxy cascade the @NotNull on my InformacionAduaneraProxy but it dosn't
happen.

The validator only returns the constraints for the EntityProxy

I have both classes on the :

@GwtValidation(value={ CredencialesUsuario.class, ProductoProxy.class, InformacionAduaneraProxy.class })

Why?
Thank you.

Daniel Mauricio Patino León

unread,
Nov 9, 2012, 3:52:26 PM11/9/12
to google-we...@googlegroups.com
Seems that Superdev mode doesn't recompile the proxies 

I did a recompile of all the project.

now works

Fri Nov 09 14:51:20 GMT-600 2012 Validation INFO: informacionAduanera.fecha informacionAduanera.fecha notNull 8868B8CCE0C8FEE0ACC285CD147AC8B1.cache.js:13326
Fri Nov 09 14:51:20 GMT-600 2012 Validation INFO: informacionAduanera.numeroDocumento informacionAduanera.numeroDocumento notNull


2012/11/9 Daniel Mauricio Patino León <ceo.li...@gmail.com>

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



--
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.



Reply all
Reply to author
Forward
0 new messages