Revision: 28380
Author: uhommes
Date: 2011-05-27 10:29:40 +0200 (Fri, 27 May 2011)
Log Message:
-----------
CMS7-5297 update the model when changing the multiple checkbox and selecting
the property type
Modified Paths:
--------------
hippo-cms7/cms/trunk/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
Modified:
hippo-cms7/cms/trunk/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
===================================================================
---
hippo-cms7/cms/trunk/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
2011-05-27 08:28:08 UTC (rev 28379)
+++
hippo-cms7/cms/trunk/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
2011-05-27 08:29:40 UTC (rev 28380)
@@ -102,10 +102,15 @@
}
// checkbox for property ismultiple
- final CheckBox checkBox = new CheckBox("isMultiple", new
PropertyModel<Boolean>(this, "isMultiple") {
+ final CheckBox checkBox = new CheckBox("isMultiple", new
Model<Boolean>() {
private static final long serialVersionUID = 1L;
@Override
+ public void setObject(Boolean multiple) {
+ PropertyDialog.this.isMultiple = multiple;
+ }
+
+ @Override
public Boolean getObject() {
if (PropertyDialog.this.name != null) {
PropertyDefinition pd =
choices.get(PropertyDialog.this.name);
@@ -115,10 +120,15 @@
return pd.isMultiple();
}
}
- return super.getObject();
+ return PropertyDialog.this.isMultiple;
}
});
checkBox.setOutputMarkupId(true);
+ checkBox.add(new AjaxFormComponentUpdatingBehavior("onchange") {
+ private static final long serialVersionUID = 1L;
+ @Override
+ protected void onUpdate(AjaxRequestTarget target) {}
+ });
add(checkBox);
// dropdown for property type
@@ -141,6 +151,11 @@
});
ddChoice.setRequired(true);
ddChoice.setOutputMarkupId(true);
+ ddChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
+ private static final long serialVersionUID = 1L;
+ @Override
+ protected void onUpdate(AjaxRequestTarget target) {}
+ });
add(ddChoice);
// text field for property name
_______________________________________________
Hippocms-svn mailing list
[email protected]
http://lists.hippo.nl/mailman/listinfo/hippocms-svn