Author: mvitenkov
Date: 2008-06-18 09:29:58 -0400 (Wed, 18 Jun 2008)
New Revision: 9096
Modified:
trunk/test-applications/jsp/src/main/webapp/PanelMenu/PanelMenu.jsp
Log:
JS API with component control
Modified: trunk/test-applications/jsp/src/main/webapp/PanelMenu/PanelMenu.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PanelMenu/PanelMenu.jsp 2008-06-18
13:13:23 UTC (rev 9095)
+++ trunk/test-applications/jsp/src/main/webapp/PanelMenu/PanelMenu.jsp 2008-06-18
13:29:58 UTC (rev 9096)
@@ -54,7 +54,7 @@
</rich:panelMenuItem>
<rich:panelMenuItem label="Action"
onmousedown="alert('OnMouseDown');"></rich:panelMenuItem>
- <rich:panelMenuGroup label="Group 1(expanded=true)"
expanded="true">
+ <rich:panelMenuGroup label="Group 1(expanded=true)"
expanded="true" id="pmg">
<rich:panelMenuItem label="Item 1"
disabled="true"></rich:panelMenuItem>
<rich:panelMenuItem label="Item 1 (action)"
onmousedown="alert('OnMouseDown');"></rich:panelMenuItem>
<rich:panelMenuItem label="Item 2"></rich:panelMenuItem>
@@ -185,9 +185,18 @@
</rich:panelMenuGroup>
</rich:panelMenu>
<h:panelGrid columns="1">
-<h:commandLink
onclick="$('formID:panelMenuSubviewID:mg2').component.expand();return
false;" value="expand"></h:commandLink>
-<h:commandLink
onclick="$('formID:panelMenuSubviewID:mg2').component.collapse();return
false;" value="collapse"></h:commandLink>
-<a4j:commandLink
onclick="PanelMenu.doExpand('formID:panelMenuSubviewID:panelMenuID');return
false;" value="doExpand"></a4j:commandLink>
-<a4j:commandLink
onclick="PanelMenu.doCollapse('formID:panelMenuSubviewID:panelMenuID');return
false;" value="doCollapse"></a4j:commandLink>
+<h:outputText value="JavaScript API" style="FONT-WEIGHT:
bold;"></h:outputText>
+<h:commandLink
onclick="$('formID:panelMenuSubviewID:pmg').component.expand();return
false;" value="expand()"></h:commandLink>
+<h:commandLink
onclick="$('formID:panelMenuSubviewID:pmg').component.collapse();return
false;" value="collapse()"></h:commandLink>
</h:panelGrid>
-</f:subview>
+<br />
+<f:verbatim>
+<h:outputText value="Component Control test" style="FONT-WEIGHT:
bold;"></h:outputText>
+<br />
+<a href="#" id="expandID">expand</a>
+<br />
+<a href="#" id="collapseID">collapse</a>
+</f:verbatim>
+<rich:componentControl attachTo="expandID" event="onclick"
for="pmg" operation="expand"></rich:componentControl>
+<rich:componentControl attachTo="collapseID" event="onclick"
for="pmg" operation="collapse"></rich:componentControl>
+</f:subview>
\ No newline at end of file
Show replies by date