Hi,
I am unable to validate entities using the editor framework. No matter what
I do the errors are never thrown from client side or server side.
Here is a code snippet:
--------------------------------------------------------------
public class P {
public P() {
}
@Size(min=4)
private String name;
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
-------------------------------------------------------------
// PEditor
public class PEditor extends Composite implements Editor<P> {
private static PEditorUiBinder uiBinder = GWT.create(PEditorUiBinder.class
);
interface PEditorUiBinder extends UiBinder<Widget, PEditor> {
}
@UiField
TextBox name;
public PEditor() {
initWidget(uiBinder.createAndBindUi(this));
}
}
---------------------------------------------------
PEditor pEditor;
interface Driver extends SimpleBeanEditorDriver<P, PEditor> {}
Driver driver = GWT.<Driver> create(Driver.class);
public void onModuleLoad() {
pEditor = new PEditor();
driver.initialize(pEditor);
P p = new P();
driver.edit(p);
pEditor.name.setText("G");
driver.flush();
if(driver.hasErrors()) {
List<EditorError> errors = driver.getErrors();
for (EditorError error : errors) {
System.out.println(error.getMessage());
}
}
}
--------------------------------------------------------------
Thanks for your help
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.