GithubHelp home page GithubHelp logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Hi, Nico

  Thanks for your nice details. 

  The UIBinding and Reflection working, it's mean your Pojo have reflectable, but for Control JavaScript size, GWTENT provided different reflection level. for example "@Reflectable" is a normal level, "@Reflect_Domain" and "@Reflect_Full" will create full reflection information for that class, to using validation, you need full reflection for your class.

  I will change the Error message to make it more obviously for validation, Thanks you very much. Please let me know how is it going :)

James

Original comment by [email protected] on 13 Jul 2010 at 11:34

  • Changed state: Accepted

from gwt-ent.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Hmm Sorry but that didn't fix my Problem.
I added @Reflect_Full to my Pojo, but nothing changed about the Exception.
The weird thing to me is that it wasn't the Pojo in the first place, that is 
mentioned in the ReflectionNeededException, but that it's the 
javax.validation.constraints.SizeValidator Class.
Or is the strategy behind that to make SizeValidator reflectable through the 
@Reflect_Full Annotation on any Pojo that is Implementing the @Size?

I got one step further by manually adding the SizeValidator class to the 
typeMap of TypeOracleImpl via instantiating a ClassTypeImpl like this:
new ClassTypeImpl(SizeValidator.class);
The SizeValidator can then be retrieved from the TypeOracleImpl when 
validating, but I end up with a NullPointer later, when the constructor is to 
be found, cause of course there is no MetaData for Reflection still :o(

So I still guess that it has to do something with the class loading of the 
Validation stuff. May it be a problem that I have javax validation API lib in 
my classpath too, where all those Validation Annotations are included also?
I didn't think so, cause that's only server-side and GWT-ent is client-side, 
but of course I don't have the complete view of what GWT ent is doing while 
preparing Reflection Information and stuff...

Thanks for your help!

Original comment by [email protected] on 14 Jul 2010 at 7:18

from gwt-ent.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Hi, Is it possible that I can have a look your Pojo class? There is a @Size in 
showcase as well but not problems.
If Pojo is fine, then maybe javax validation API is the problem as well.

James

Original comment by [email protected] on 14 Jul 2010 at 9:13

from gwt-ent.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Hi James,

the Pojo Code is the following:

package de.hdi.bin.fub.client.model;

import java.io.Serializable;

import javax.validation.constraints.Size;

import com.gwtent.reflection.client.annotations.Reflect_Full;
import com.gwtent.validate.client.constraints.Required;

/**
 * GWT Model Klasse zur Representation der Kurzform eines VUs.
 * 
 * @author Rogasch
 */
@Reflect_Full
public class VuKurz implements Serializable {

    private static final long serialVersionUID = 1L;

    Long vuNummer;

    @Required
    @Size(min = 5)
    String vuName;

    String vuOrt;

    public Long getVuNummer() {
        return this.vuNummer;
    }

    public void setVuNummer(final Long vuNummer) {
        this.vuNummer = vuNummer;
    }

    public String getVuName() {
        return this.vuName;
    }

    public void setVuName(final String vuName) {
        this.vuName = vuName;
    }

    public String getVuOrt() {
        return this.vuOrt;
    }

    public void setVuOrt(final String vuOrt) {
        this.vuOrt = vuOrt;
    }

}

Original comment by [email protected] on 14 Jul 2010 at 9:22

from gwt-ent.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Thanks, the pojo is correct. I will put a separated javax validation jar to my 
gwt compile classpath and try again. will let you know tomorrow. 

Can you try to remove the validation jar from your gwt compile classpath? I 
think that will help :)

Original comment by [email protected] on 14 Jul 2010 at 9:57

from gwt-ent.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Hi James,
I see no chance to remove the validation jar from the project, since it's part 
of a bigger scope and even though it's not directly used in my project, it's a 
dependency of some framework component we use.
Shouldn't there be a way to tell GWT only to use the GWT-Ent classes?
We did something like that with the Apache Commons library.
We override the log4J standard classes so they could also be used on 
client-side(triggering a remote-service that logs the stuff on the server) and 
tell GWT to replace the standard log4j classes with our custom made classes 
when generating the client-side code.
We used the "<super-source path="">" entry in our gwt.xml for that. Are you 
familiar with that configuration?

P.S.: Sorry but my next answer may take a while, since I'm going onto well 
earned vacation for a week, but I may tell a collegue to continue with this 
topic :o)

Original comment by [email protected] on 15 Jul 2010 at 1:18

from gwt-ent.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Hi, Nico

  Thank you very much. I will working on this, actually the JSR303 implement here is a subset of JSR303, no all API can be supported in GWT client code. I will review my codes and will let you know how it's going. 

James

Original comment by [email protected] on 20 Jul 2010 at 12:10

from gwt-ent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.