Revision: 28504
Author: uhommes
Date: 2011-06-08 14:20:59 +0200 (Wed, 08 Jun 2011)
Log Message:
-----------
CMS7-5297 update the model when changing the multiple checkbox and selecting
the property type
Modified Paths:
--------------
hippo-cms7/cms/branches/hippo-cms-2.20.xx/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
Modified:
hippo-cms7/cms/branches/hippo-cms-2.20.xx/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
===================================================================
---
hippo-cms7/cms/branches/hippo-cms-2.20.xx/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
2011-06-08 12:20:20 UTC (rev 28503)
+++
hippo-cms7/cms/branches/hippo-cms-2.20.xx/plugins/src/main/java/org/hippoecm/frontend/plugins/console/menu/property/PropertyDialog.java
2011-06-08 12:20:59 UTC (rev 28504)
@@ -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