Author: Alex.Kolonitsky
Date: 2011-01-18 12:43:39 -0500 (Tue, 18 Jan 2011)
New Revision: 21062
Modified:
trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
Log:
RF-10159: Panel Menu - @itemMode, @groupMode attributes has not effect
RF-10174: PanelMenu: JS error on page unload
Modified: trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2011-01-18 17:02:50
UTC (rev 21061)
+++ trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2011-01-18 17:43:39
UTC (rev 21062)
@@ -49,8 +49,8 @@
<pn:panelMenu
id="panelMenu"
expandSingle="true"
- itemMode="ajax"
- groupMode="ajax"
+ itemMode="server"
+ groupMode="server"
activeItem="myFavariteIten"
itemDisableIconLeft="disc"
groupDisableIconLeft="disc"
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-18
17:02:50 UTC (rev 21061)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-18
17:43:39 UTC (rev 21062)
@@ -23,6 +23,7 @@
package org.richfaces.component;
+import org.richfaces.PanelMenuMode;
import org.richfaces.cdk.annotations.*;
import org.richfaces.event.ItemChangeEvent;
import org.richfaces.event.PanelToggleEvent;
@@ -154,12 +155,8 @@
@Attribute(defaultValue = "Boolean.FALSE")
public abstract Boolean isSelectable();
-/*
- @Override
- public PanelMenuMode getMode() {
- return (PanelMenuMode) getStateHelper().eval(UIPanelMenuItem.PropertyKeys.mode,
getPanelMenu().getGroupMode());
- }
-*/
+ @Attribute(defaultValue = "getPanelMenu().getGroupMode()")
+ public abstract PanelMenuMode getMode();
@Attribute(defaultValue = "getPanelMenu().isExpandSingle()")
public abstract boolean isExpandSingle();
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-01-18
17:02:50 UTC (rev 21061)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-01-18
17:43:39 UTC (rev 21062)
@@ -86,7 +86,7 @@
@Attribute(defaultValue = "Boolean.TRUE")
public abstract Boolean isSelectable();
- @Attribute(defaultValue = "Boolean.FALSE")
+ @Attribute(defaultValue = "Boolean.FALSE", hidden = true)
public abstract Boolean isUnselectable();
@Attribute(defaultValue = "getPanelMenu().getItemMode()")
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-01-18
17:02:50 UTC (rev 21061)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-01-18
17:43:39 UTC (rev 21062)
@@ -313,7 +313,11 @@
},
destroy: function () {
- delete this.__rfPanelMenu().getItems()[this.itemName];
+ var panelMenu = this.__rfPanelMenu();
+ if (panelMenu.getItems && panelMenu.getItems()[this.itemName]) {
+ delete panelMenu.getItems()[this.itemName];
+ }
+
$super.destroy.call(this);
}
});
Show replies by date