Author: Alex.Kolonitsky
Date: 2010-12-14 10:45:15 -0500 (Tue, 14 Dec 2010)
New Revision: 20558
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
Log:
RF-9893: Toggle panel: activeItem cannot be changed dynamically
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2010-12-14
15:16:23 UTC (rev 20557)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2010-12-14
15:45:15 UTC (rev 20558)
@@ -264,6 +264,7 @@
popComponentFromEL(context);
+ executeValidate(context);
try {
updateModel(context);
} catch (RuntimeException e) {
@@ -271,7 +272,6 @@
throw e;
}
- executeValidate(context);
if (!isValid()) {
context.renderResponse();
}
@@ -302,7 +302,7 @@
return;
}
- ValueExpression ve = getValueExpression("activeItem");
+ ValueExpression ve = getValueExpression("value");
if (ve == null) {
return;
}
@@ -543,6 +543,14 @@
// ------------------------------------------------ Properties
+
+ @Override
+ public void setValue(Object value) {
+ super.setValue(value);
+
+ setLocalValueSet(true);
+ }
+
public String getActiveItem() {
return (String) getValue();
}