Hi,
Is it possible to FormBinding to bind bind data to BeanModel? When I used BaseModel instead it worked, now I can't make it work with BeanModel using following code (productBean has null fields after filling form):
Code:
public class Product extends LightEntity implements BeanModelTag, IsSerializable {
@Id
@GeneratedValue
private Long id;
private String name;
...
public Product() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
BeanModelFactory factory = BeanModelLookup.get().getFactory(Product.class);
BeanModel productBean = factory.createModel(new Product());
....
FormPanel formPanel = new FormPanel();
formBinding = new FormBinding(formPanel, true);
formBinding.bind(productBean);
TextField<String> nameField = new TextField<String>();
nameField.setFieldLabel("Name");
nameField.setName("name");
....