Author: nbelaevski
Date: 2010-12-13 14:32:01 -0500 (Mon, 13 Dec 2010)
New Revision: 20543
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
Log:
https://issues.jboss.org/browse/RF-9463
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2010-12-13
19:09:26 UTC (rev 20542)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2010-12-13
19:32:01 UTC (rev 20543)
@@ -144,6 +144,7 @@
HtmlPanelMenuItem panelMenuItem = (HtmlPanelMenuItem) component;
Map<String, Object> options = new HashMap<String, Object>();
+ //TODO nick - ajax options should not be rendered in client mode
options.put("ajax", getAjaxOptions(context, panelMenuItem));
options.put("disabled", panelMenuItem.isDisabled());
options.put("mode", panelMenuItem.getMode());
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 2010-12-13
19:09:26 UTC (rev 20542)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2010-12-13
19:32:01 UTC (rev 20543)
@@ -61,6 +61,7 @@
* */
execServer : function (item) {
item.__changeState();
+ //TODO nick - 'target' attribute?
rf.submitForm(this.__getParentForm(item));
return false;
@@ -73,6 +74,7 @@
* */
execAjax : function (item) {
var oldItem = item.__changeState();
+ //TODO nick - check for interaction with queue
rf.ajax(item.__panelMenu().id, null, $.extend({},
item.options["ajax"], {}));
item.__restoreState(oldItem);
@@ -209,7 +211,8 @@
if (panelMenu.selectedItem() == this.itemName) {
panelMenu.selectedItem(null);
} else {
- rf.warn("You try unselect item (name=" + this.itemName +
") that isn't seleted")
+ //TODO nick - should be rf.log.warn
+ rf.warn("You tried to unselect item (name=" + this.itemName +
") that isn't seleted")
}
this.__unselect();
@@ -253,6 +256,7 @@
},
__rfPanelMenu : function () {
+ //TODO nick - return rf.$(this.__panelMenu())
return rf.$(this.__item().parents(".rf-pm")[0]);
},
@@ -270,6 +274,7 @@
return $(rf.getDomElement(this.id));
},
+ //TODO nick - __item() vs __header()?
__header : function () {
return this.__item();
},
@@ -283,7 +288,9 @@
},
__fireBeforeSelect : function () {
+ //TODO nick - 'new' is not necessary here
return new rf.Event.fireById(this.id, "beforeselect", {
+ //TODO nick - pass item here
id: this.id
});
},