-
1. Re: Errai data binding
chaluwa Feb 19, 2014 8:01 AM (in response to razvan_v100)Can't tell what U are doing wrong if U don't post some of your code here ...
-
2. Re: Errai data binding
razvan_v100 Feb 19, 2014 10:07 AM (in response to chaluwa)Okay, I can't post the actual code because of an NDA but I can exemplify. So I have a model like this one:
@Bindable
public class FieldModel {
@FieldConstraint
private String field;
... // getter setter here
}
Then I have a widget like this:
@Templated(Templates.MYTEMPLATE + "#fieldTemplate")
public class MyWidget{
@Inject @Model
private FieldModel model;
@Inject @Bound
@DataField
private TextBox field;
// now in here the model does not get updated
// I had to implement a hack onKeyEvent and on each keypress I have to make a model.setField("new value"); otherwise model.getValue() returns null
}
The Errai version I am using is 2.4.3:
App.GWT.xml is correctly configured to include the databinding inheritance as well as the pom.xml file as described in the http://docs.jboss.org/errai/2.1.0.CR2/errai/reference/html/sid-51282340.html .
I hope this helps,
Best Regards,
Razvan