Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Reflection - Invoking Parameterzied Constructor HOT 3
- bundled javax.validation package is outdated, update to latest 1.0.0.GA
- classType.getFields() method does not return fields in correct order
- Data Binding fails in Google App Engine
- Won't compile with GWT 2.2 HOT 5
- (TypeError): 'com_gwtent_reflection_client_impl_TypeOracleImpl_typeMap' is Null or no Object HOT 14
- Errors in 'gwtent-2.0.jar!/com/gwtent/aop/client/AOPRegistor.java' HOT 2
- [2.0RC1] Incorrect casting for generic argument HOT 9
- Example for Serialization
- HashMap interface list is missing Map
- GWT compilation error while rebinding TypeOracle on Annotation (com.google.gwt.resources.ext.ResourceGeneratorType) HOT 3
- Compile Error - AnnotationsHelper.java (gwtent2.0 and gwt 2.2.0)
- maven repository HOT 1
- Error in GWT compilation [Gwt 2.4] HOT 2
- TypeOracle.Instance == NULL
- Build for GWT 2.4
- New release of gwt-ent? HOT 1
- GWT Compiler + ListGrid + com.gwtent.reflection.client compile failure HOT 1
- Add support for exploring arrays in reflection
- gwt-ent won't compile with gwt 2.7.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-ent.