Author: ayanul
Date: 2007-11-29 11:20:06 -0500 (Thu, 29 Nov 2007)
New Revision: 4352
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/contextMenu/ContextMenu.java
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenu.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml
Log:
update ContextMenu
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/contextMenu/ContextMenu.java
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/java/contextMenu/ContextMenu.java 2007-11-29
15:59:38 UTC (rev 4351)
+++
branches/3.1.x/test-applications/facelets/src/main/java/contextMenu/ContextMenu.java 2007-11-29
16:20:06 UTC (rev 4352)
@@ -3,12 +3,15 @@
import java.util.Map;
import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
public class ContextMenu {
private String info;
+ private String inputText;
private String submitMode;
private String event;
private String popupWidth;
+ private String selectOneMenu;
private int hideDelay;
private int showDelay;
private boolean disableDefaultMenu;
@@ -32,11 +35,18 @@
return info;
}
+ public void actionListener(ActionEvent event) {
+ setInfo("actionListener");
+ }
+
public void setInfo(String info) {
+ System.out.println("Info: " + info);
this.info = info;
}
public ContextMenu() {
+ selectOneMenu = "item1";
+ inputText = "inputText";
submitMode = "none";
event = "oncontextmenu";
popupWidth = "300px";
@@ -111,5 +121,20 @@
public void setShowDelay(int showDelay) {
this.showDelay = showDelay;
}
-
+
+ public String getInputText() {
+ return inputText;
+ }
+
+ public void setInputText(String inputText) {
+ this.inputText = inputText;
+ }
+
+ public String getSelectOneMenu() {
+ return selectOneMenu;
+ }
+
+ public void setSelectOneMenu(String selectOneMenu) {
+ this.selectOneMenu = selectOneMenu;
+ }
}
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenu.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenu.xhtml 2007-11-29
15:59:38 UTC (rev 4351)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenu.xhtml 2007-11-29
16:20:06 UTC (rev 4352)
@@ -1,12 +1,153 @@
<f:subview id="contextMenuSubviewID"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <h:panelGrid columns="2">
- <rich:panel style="width: 130px; height: 50px; background-color:
#98FB98;">
- <h:outputText value="panel with contextMenu(DEFAULT)" />
- <rich:contextMenu id="contextMenuDefaultID"
submitMode="client">
- <rich:menuItem icon="/pics/header.png" value="abc"
reRender="cmInfoID">
- <f:param name="cmdParam" value="abc" />
+ <h:panelGrid columns="2">
+ <rich:panel style="width: 130px; height: 50px; background-color:
#98FB98;">
+ <h:outputText value="panel with contextMenu(DEFAULT)" />
+ <rich:contextMenu id="contextMenuDefaultID"
submitMode="ajax">
+ <rich:menuItem icon="/pics/header.png" value="abc"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="abc" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="a"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="a" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value=" b"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="b" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="c"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="c" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="d"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="d" />
+ </rich:menuItem>
+ <rich:menuGroup value="menuGroup">
+ <rich:menuItem icon="/pics/fatal.gif" value="a"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="a" />
</rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="b"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="b" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="c"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="c" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="d"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="d" />
+ </rich:menuItem>
+ </rich:menuGroup>
+ </rich:contextMenu>
+ </rich:panel>
+
+ <rich:panel style="width: 130px; height: 50px; background-color:
#98FB98;">
+ <h:outputText value="panel with contextMenu(Test)" />
+ <rich:contextMenu id="contextMenuID"
attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}"
+ event="#{contextMenu.event}"
disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
+ hideDelay="#{contextMenu.hideDelay}"
showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
+ <rich:menuItem icon="/pics/header.png" value="abc"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="abc" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="action"
action="alert('action work')" reRender="cmInfoID">
+ <f:param name="cmdParam" value="action" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="actionListener"
actionListener="#{contextMenu.actionListener}"
reRender="cmInfoID">
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="ajaxSingle"
ajaxSingle="true" action="submit()" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajaxSingle" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="disabled"
disabled="true" reRender="cmInfoID">
+ <f:param name="cmdParam" value="disabled" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="immediate"
immediate="true" action="submit();">
+ <f:param name="cmdParam" value="immedeate" />
+ <h:inputText value="#{contextMenu.inputText}" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: none"
submitMode="none" reRender="cmInfoID">
+ <f:param name="cmdParam" value="none" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode:
server" submitMode="server" reRender="cmInfoID">
+ <f:param name="cmdParam" value="server" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: ajax"
submitMode="ajax" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajax" />
+ </rich:menuItem>
+ <rich:menuItem value="select">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}"
onchange="submit();">
+ <f:selectItem itemLabel="item1" itemValue="item1" />
+ <f:selectItem itemLabel="item2" itemValue="item2" />
+ </h:selectOneMenu>
+ </rich:menuItem>
+ <rich:menuGroup value="menuGroup">
+ <rich:menuItem icon="/pics/fatal.gif" value="a"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="a" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="b"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="b" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="c"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="c" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="d"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="d" />
+ </rich:menuItem>
+ </rich:menuGroup>
+ </rich:contextMenu>
+ </rich:panel>
+ </h:panelGrid>
+ <h:panelGrid id="cmInfoID" olumns="2">
+ <h:outputText value="Select items: " />
+ <h:outputText value="#{contextMenu.info}" style="color: red"
/>
+ </h:panelGrid>
+
+ <h:panelGrid id="pgcmTestID" columns="3">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}">
+ <f:selectItem itemLabel="select1" itemValue="select1" />
+ <f:selectItem itemLabel="select2" itemValue="select2" />
+ <rich:contextMenu attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}" event="#{contextMenu.event}"
+ disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
hideDelay="#{contextMenu.hideDelay}"
+ showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
+ <rich:menuItem icon="/pics/header.png" value="select"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="select" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="action"
action="alert('action work')" reRender="cmInfoID">
+ <f:param name="cmdParam" value="action" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="actionListener"
actionListener="#{contextMenu.actionListener}"
reRender="cmInfoID">
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="ajaxSingle"
ajaxSingle="true" action="submit()" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajaxSingle" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="disabled"
disabled="true" reRender="cmInfoID">
+ <f:param name="cmdParam" value="disabled" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="immediate"
immediate="true" action="submit();">
+ <f:param name="cmdParam" value="immedeate" />
+ <h:inputText value="#{contextMenu.inputText}" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: none"
submitMode="none" reRender="cmInfoID">
+ <f:param name="cmdParam" value="none" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode:
server" submitMode="server" reRender="cmInfoID">
+ <f:param name="cmdParam" value="server" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: ajax"
submitMode="ajax" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajax" />
+ </rich:menuItem>
+ <rich:menuItem value="select">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}"
onchange="submit();">
+ <f:selectItem itemLabel="item1" itemValue="item1" />
+ <f:selectItem itemLabel="item2" itemValue="item2" />
+ </h:selectOneMenu>
+ </rich:menuItem>
+ </rich:contextMenu>
+ </h:selectOneMenu>
+
+ <rich:tabPanel id="tpcmTestID" switchType="client">
+ <rich:tab id="t1cmTestID" label="tab1">
+ <rich:contextMenu submitMode="ajax">
+ <rich:menuItem icon="/pics/header.png" value="tab1"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="tab1" />
+ </rich:menuItem>
<rich:menuSeparator />
<rich:menuItem icon="/pics/info.gif" value="a"
reRender="cmInfoID">
<f:param name="cmdParam" value="a" />
@@ -17,33 +158,31 @@
<rich:menuItem icon="/pics/info.gif" value="c"
reRender="cmInfoID">
<f:param name="cmdParam" value="c" />
</rich:menuItem>
- <rich:menuItem icon="/pics/info.gif" value="d"
reRender="cmInfoID">
- <f:param name="cmdParam" value="d" />
+ </rich:contextMenu>
+ <h:outputText value="text1" />
+ </rich:tab>
+ <rich:tab id="t2cmTestID" label="tab2">
+ <rich:contextMenu submitMode="ajax">
+ <rich:menuItem icon="/pics/header.png" value="tab2"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="tab2" />
</rich:menuItem>
- <rich:menuGroup value="menuGroup">
- <rich:menuItem icon="/pics/fatal.gif" value="a"
reRender="cmInfoID">
- <f:param name="cmdParam" value="a" />
- </rich:menuItem>
- <rich:menuItem icon="/pics/fatal.gif" value="{cmdParam} b"
reRender="cmInfoID">
- <f:param name="cmdParam" value="b" />
- </rich:menuItem>
- <rich:menuItem icon="/pics/fatal.gif" value="c"
reRender="cmInfoID">
- <f:param name="cmdParam" value="c" />
- </rich:menuItem>
- <rich:menuItem icon="/pics/fatal.gif" value="d"
reRender="cmInfoID">
- <f:param name="cmdParam" value="d" />
- </rich:menuItem>
- </rich:menuGroup>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="a"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="a" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value=" b"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="b" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="c"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="c" />
+ </rich:menuItem>
</rich:contextMenu>
- </rich:panel>
-
- <rich:panel style="width: 130px; height: 50px; background-color:
#98FB98;">
- <h:outputText value="panel with contextMenu(Test)" />
- <rich:contextMenu id="contextMenuID"
attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}" event="#{contextMenu.event}"
- disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
- hideDelay="#{contextMenu.hideDelay}"
showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
- <rich:menuItem icon="/pics/header.png" value="abc"
reRender="cmInfoID">
- <f:param name="cmdParam" value="abc" />
+ <h:outputText value="text2" />
+ </rich:tab>
+ <rich:tab id="t3cmTestID" label="tab3">
+ <rich:contextMenu submitMode="ajax">
+ <rich:menuItem icon="/pics/header.png" value="tab3"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="tab3" />
</rich:menuItem>
<rich:menuSeparator />
<rich:menuItem icon="/pics/info.gif" value="a"
reRender="cmInfoID">
@@ -55,29 +194,214 @@
<rich:menuItem icon="/pics/info.gif" value="c"
reRender="cmInfoID">
<f:param name="cmdParam" value="c" />
</rich:menuItem>
- <rich:menuItem icon="/pics/info.gif" value="d"
reRender="cmInfoID">
- <f:param name="cmdParam" value="d" />
- </rich:menuItem>
- <rich:menuGroup value="menuGroup">
- <rich:menuItem icon="/pics/fatal.gif" value="a"
reRender="cmInfoID">
- <f:param name="cmdParam" value="a" />
- </rich:menuItem>
- <rich:menuItem icon="/pics/fatal.gif" value="{cmdParam} b"
reRender="cmInfoID">
- <f:param name="cmdParam" value="b" />
- </rich:menuItem>
- <rich:menuItem icon="/pics/fatal.gif" value="c"
reRender="cmInfoID">
- <f:param name="cmdParam" value="c" />
- </rich:menuItem>
- <rich:menuItem icon="/pics/fatal.gif" value="d"
reRender="cmInfoID">
- <f:param name="cmdParam" value="d" />
- </rich:menuItem>
- </rich:menuGroup>
</rich:contextMenu>
- </rich:panel>
- <h:panelGrid id="cmInfoID" columns="2">
- <h:outputText value="Select items: " />
- <h:outputText value="#{contextMenu.info}" style="color:
red"/>
- </h:panelGrid>
-
+ <h:outputText value="text3" />
+ </rich:tab>
+ <rich:contextMenu attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}" event="#{contextMenu.event}"
+ disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
hideDelay="#{contextMenu.hideDelay}"
+ showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
+ <rich:menuItem icon="/pics/header.png" value="tabPanel"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="tabPanel" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="action"
action="alert('action work')" reRender="cmInfoID">
+ <f:param name="cmdParam" value="action" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="actionListener"
actionListener="#{contextMenu.actionListener}"
reRender="cmInfoID">
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="ajaxSingle"
ajaxSingle="true" action="submit()" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajaxSingle" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="disabled"
disabled="true" reRender="cmInfoID">
+ <f:param name="cmdParam" value="disabled" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="immediate"
immediate="true" action="submit();">
+ <f:param name="cmdParam" value="immedeate" />
+ <h:inputText value="#{contextMenu.inputText}" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: none"
submitMode="none" reRender="cmInfoID">
+ <f:param name="cmdParam" value="none" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode:
server" submitMode="server" reRender="cmInfoID">
+ <f:param name="cmdParam" value="server" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: ajax"
submitMode="ajax" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajax" />
+ </rich:menuItem>
+ <rich:menuItem value="select">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}"
onchange="submit();">
+ <f:selectItem itemLabel="item1" itemValue="item1" />
+ <f:selectItem itemLabel="item2" itemValue="item2" />
+ </h:selectOneMenu>
+ </rich:menuItem>
+ </rich:contextMenu>
+ </rich:tabPanel>
+
+ <h:graphicImage id="gicmID" value="/pics/asus.jpg"
height="125px" width="150px">
+ <rich:contextMenu attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}" event="#{contextMenu.event}"
+ disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
hideDelay="#{contextMenu.hideDelay}"
+ showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
+ <rich:menuItem icon="/pics/header.png" value="graphicImage"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="graphicImage" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="action"
action="alert('action work')" reRender="cmInfoID">
+ <f:param name="cmdParam" value="action" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="actionListener"
actionListener="#{contextMenu.actionListener}"
reRender="cmInfoID">
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="ajaxSingle"
ajaxSingle="true" action="submit()" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajaxSingle" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="disabled"
disabled="true" reRender="cmInfoID">
+ <f:param name="cmdParam" value="disabled" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="immediate"
immediate="true" action="submit();">
+ <f:param name="cmdParam" value="immedeate" />
+ <h:inputText value="#{contextMenu.inputText}" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: none"
submitMode="none" reRender="cmInfoID">
+ <f:param name="cmdParam" value="none" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode:
server" submitMode="server" reRender="cmInfoID">
+ <f:param name="cmdParam" value="server" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: ajax"
submitMode="ajax" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajax" />
+ </rich:menuItem>
+ <rich:menuItem value="select">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}"
onchange="submit();">
+ <f:selectItem itemLabel="item1" itemValue="item1" />
+ <f:selectItem itemLabel="item2" itemValue="item2" />
+ </h:selectOneMenu>
+ </rich:menuItem>
+ </rich:contextMenu>
+ </h:graphicImage>
+
+ <h:inputText id="itcmTestID" value="inputText">
+ <rich:contextMenu attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}" event="#{contextMenu.event}"
+ disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
hideDelay="#{contextMenu.hideDelay}"
+ showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
+ <rich:menuItem icon="/pics/header.png" value="inputText"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="inputText" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="action"
action="alert('action work')" reRender="cmInfoID">
+ <f:param name="cmdParam" value="action" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="actionListener"
actionListener="#{contextMenu.actionListener}"
reRender="cmInfoID">
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="ajaxSingle"
ajaxSingle="true" action="submit()" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajaxSingle" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="disabled"
disabled="true" reRender="cmInfoID">
+ <f:param name="cmdParam" value="disabled" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="immediate"
immediate="true" action="submit();">
+ <f:param name="cmdParam" value="immedeate" />
+ <h:inputText value="#{contextMenu.inputText}" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: none"
submitMode="none" reRender="cmInfoID">
+ <f:param name="cmdParam" value="none" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode:
server" submitMode="server" reRender="cmInfoID">
+ <f:param name="cmdParam" value="server" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: ajax"
submitMode="ajax" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajax" />
+ </rich:menuItem>
+ <rich:menuItem value="select">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}"
onchange="submit();">
+ <f:selectItem itemLabel="item1" itemValue="item1" />
+ <f:selectItem itemLabel="item2" itemValue="item2" />
+ </h:selectOneMenu>
+ </rich:menuItem>
+ </rich:contextMenu>
+ </h:inputText>
+
+
+ <div id="divcmTestID" style="width: 80px; height: 45px;
background-color: #008080;"> <rich:contextMenu
+ attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}" event="#{contextMenu.event}"
+ disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
hideDelay="#{contextMenu.hideDelay}"
+ showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
+ <rich:menuItem icon="/pics/header.png" value="div"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="div" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="action"
action="alert('action work')" reRender="cmInfoID">
+ <f:param name="cmdParam" value="action" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="actionListener"
actionListener="#{contextMenu.actionListener}"
reRender="cmInfoID">
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="ajaxSingle"
ajaxSingle="true" action="submit()" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajaxSingle" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="disabled"
disabled="true" reRender="cmInfoID">
+ <f:param name="cmdParam" value="disabled" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="immediate"
immediate="true" action="submit();">
+ <f:param name="cmdParam" value="immedeate" />
+ <h:inputText value="#{contextMenu.inputText}" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: none"
submitMode="none" reRender="cmInfoID">
+ <f:param name="cmdParam" value="none" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode:
server" submitMode="server" reRender="cmInfoID">
+ <f:param name="cmdParam" value="server" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: ajax"
submitMode="ajax" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajax" />
+ </rich:menuItem>
+ <rich:menuItem value="select">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}"
onchange="submit();">
+ <f:selectItem itemLabel="item1" itemValue="item1" />
+ <f:selectItem itemLabel="item2" itemValue="item2" />
+ </h:selectOneMenu>
+ </rich:menuItem>
+ </rich:contextMenu></div>
+
+
+ <h:panelGrid id="pgTestID" columns="1" border="5"
cellpadding="2" cellspacing="2">
+ <h:outputText value="panelGrid" />
+ <h:outputText value="" />
+ <rich:contextMenu attached="#{contextMenu.attached}"
submitMode="#{contextMenu.submitMode}" event="#{contextMenu.event}"
+ disableDefaultMenu="#{contextMenu.disableDefaultMenu}"
rendered="#{contextMenu.rendered}"
hideDelay="#{contextMenu.hideDelay}"
+ showDelay="#{contextMenu.showDelay}"
popupWidth="#{contextMenu.popupWidth}">
+ <rich:menuItem icon="/pics/header.png" value="panelGrid"
reRender="cmInfoID">
+ <f:param name="cmdParam" value="panelGrid" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="action"
action="alert('action work')" reRender="cmInfoID">
+ <f:param name="cmdParam" value="action" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="actionListener"
actionListener="#{contextMenu.actionListener}"
reRender="cmInfoID">
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="ajaxSingle"
ajaxSingle="true" action="submit()" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajaxSingle" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="disabled"
disabled="true" reRender="cmInfoID">
+ <f:param name="cmdParam" value="disabled" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="immediate"
immediate="true" action="submit();">
+ <f:param name="cmdParam" value="immedeate" />
+ <h:inputText value="#{contextMenu.inputText}" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: none"
submitMode="none" reRender="cmInfoID">
+ <f:param name="cmdParam" value="none" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode:
server" submitMode="server" reRender="cmInfoID">
+ <f:param name="cmdParam" value="server" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/fatal.gif" value="submitMode: ajax"
submitMode="ajax" reRender="cmInfoID">
+ <f:param name="cmdParam" value="ajax" />
+ </rich:menuItem>
+ <rich:menuItem value="select">
+ <h:selectOneMenu value="#{contextMenu.selectOneMenu}"
onchange="submit();">
+ <f:selectItem itemLabel="item1" itemValue="item1" />
+ <f:selectItem itemLabel="item2" itemValue="item2" />
+ </h:selectOneMenu>
+ </rich:menuItem>
+ </rich:contextMenu>
</h:panelGrid>
-</f:subview>
\ No newline at end of file
+ </h:panelGrid>
+</f:subview>
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml 2007-11-29
15:59:38 UTC (rev 4351)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/ContextMenu/ContextMenuProperty.xhtml 2007-11-29
16:20:06 UTC (rev 4352)
@@ -1,13 +1,18 @@
<f:subview id="contextMenuPropertySubviewID"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <a4j:commandButton value="reRender"
reRender="orderingListID"></a4j:commandButton>
+ <a4j:commandButton action="submit();" value="a4j
submit();"></a4j:commandButton>
+ <a4j:commandButton action="submit();" immediate="true"
value="immediate submit(); (a4j)"></a4j:commandButton>
+ <h:commandButton action="submit();" value="submit();" />
+ <h:commandButton action="submit();" immediate="true"
value="immediate submit();" />
+
<h:panelGrid columns="2" style="top">
-
<h:outputText value="event:" />
<h:selectOneMenu value="#{contextMenu.event}"
onchange="submit();">
<f:selectItem itemLabel="oncontextmenu"
itemValue="oncontextmenu" />
<f:selectItem itemLabel="onclick" itemValue="onclick" />
<f:selectItem itemLabel="onmousemove" itemValue="onmousemove"
/>
- <f:selectItem itemLabel="onblur" itemValue="onblur" />
</h:selectOneMenu>
<h:outputText value="popupWidth:" />
@@ -25,13 +30,13 @@
<a4j:support event="onchange"
reRender="contextMenuID"></a4j:support>
</h:inputText>
- <h:outputText value="submitMode:" onchange="submit();" />
- <h:selectOneRadio value="#{contextMenu.submitMode}">
+ <h:outputText value="submitMode:" />
+ <h:selectOneRadio value="#{contextMenu.submitMode}"
onchange="submit();">
<f:selectItem itemLabel="none" itemValue="none" />
<f:selectItem itemLabel="server" itemValue="server" />
<f:selectItem itemLabel="ajax" itemValue="ajax" />
</h:selectOneRadio>
-
+
<h:outputText value="attached" />
<h:selectBooleanCheckbox value="#{contextMenu.attached}"
onchange="submit();" />
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml
===================================================================
---
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml 2007-11-29
15:59:38 UTC (rev 4351)
+++
branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingListStraightforward.xhtml 2007-11-29
16:20:06 UTC (rev 4352)
@@ -35,6 +35,7 @@
<h:panelGroup>
<a4j:commandButton value="reRender"
reRender="orderingListID"></a4j:commandButton>
<a4j:commandButton action="submit();" value="a4j
submit();"></a4j:commandButton>
+ <a4j:commandButton action="submit();" immediate="true"
value="immediate submit(); (a4j)"></a4j:commandButton>
<h:commandButton action="submit();" value="submit();" />
<h:commandButton action="submit();" immediate="true"
value="immediate submit();" />
</h:panelGroup>