Author: Alex.Kolonitsky
Date: 2009-02-24 03:56:34 -0500 (Tue, 24 Feb 2009)
New Revision: 12725
Modified:
trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java
Log:
https://jira.jboss.org/jira/browse/RF-6275
Modified:
trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java
===================================================================
---
trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java 2009-02-24
00:18:13 UTC (rev 12724)
+++
trunk/ui/componentControl/src/main/java/org/richfaces/component/UIComponentControl.java 2009-02-24
08:56:34 UTC (rev 12725)
@@ -215,7 +215,7 @@
public boolean isDisableDefault() {
if (this.disableDefaultSet) {
- return getEvent().equalsIgnoreCase(ON_CONTEXT_MENU);
+ return ON_CONTEXT_MENU.equalsIgnoreCase(getEvent());
}
ValueExpression ve = getValueExpression(DISABLE_DEFAULT);
@@ -237,4 +237,21 @@
this.disableDefault = disableDefault;
this.disableDefaultSet = true;
}
+
+ @Override
+ public Object saveState(FacesContext context) {
+ Object[] state = new Object[9];
+ state[0] = super.saveState(context);
+ state[1] = disableDefault;
+ state[2] = disableDefaultSet;
+ return state;
+ }
+
+ @Override
+ public void restoreState(FacesContext context, Object state) {
+ Object[] states = (Object[]) state;
+ super.restoreState(context, states[0]);
+ disableDefault = (Boolean) states[1];
+ disableDefaultSet = (Boolean) states[2];
+ }
}