No - i officially don't know what's wrong :)
This is my snippet
-----
List<String> list = new
ArrayList<String>(model.getObject().getConstraints().keySet());
// display any existing constraints
form.add(new ListView<String>("fields", list) {
protected void populateItem(ListItem<String> listItem) {
final Label label = new Label("label", new
Model<Class>(model.getObject().getDocumentType()));
label.setDefaultModelObject(label.getString(listItem.getModelObject()));
listItem.add(label);
listItem.add(new ListView<Constraint>("constraints", new
PropertyModel<List<Constraint>>(model, String.format("constraints[%s]",
listItem.getModelObject()))) {
protected void populateItem(ListItem<Constraint>
listItem) {
listItem.add(getConstraintFormField(listItem.getModel()));
}
}.setReuseItems(true));
}
}.setReuseItems(true));
The only constraint form field is this
public LengthBetweenConstraintField(String id, IModel model) {
super(id, model);
add(new TextField("minimum", new PropertyModel(model, "minimum")));
add(new TextField("maximum", new PropertyModel(model, "maximum")));
}
When the page is rendered - the correct values appear. However when it's
submitted - the values for max and minimum are set to null.
HELP :)
--
View this message in context:
http://www.nabble.com/Need-help-editing-a-Map-plz.-tp21554555p21556339.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]