Author: ilya_shaikovsky
Date: 2010-12-06 10:27:17 -0500 (Mon, 06 Dec 2010)
New Revision: 20405
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/panelMenu.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/togglePanel/samples/simple-sample.xhtml
Log:
panelMenu samples finished.
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/panelMenu.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/panelMenu.xhtml 2010-12-06
14:11:23 UTC (rev 20404)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/panelMenu.xhtml 2010-12-06
15:27:17 UTC (rev 20405)
@@ -17,6 +17,10 @@
<ui:param name="openLabel" value="View Source" />
<ui:param name="hideLabel" value="Hide Source" />
</ui:include>
+ <p>That menu uses parent component <b>itemChangeListener</b> to
+ output current selection but you could use <b>action/actionListener</b>
+ pair at <b>panelMenuItem</b>'s as usually to perform navigation and
+ process ActionEvent from them</p>
<p>Switching mode could be chosen with the <b>itemMode</b>
attribute for all panelMenu items except ones where this attribute was
redefined.</p>
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml 2010-12-06
14:11:23 UTC (rev 20404)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml 2010-12-06
15:27:17 UTC (rev 20405)
@@ -12,64 +12,38 @@
</style>
<h:form id="form">
<h:panelGrid columns="2" columnClasses="cols,cols"
width="400">
- <rich:panelMenu style="width:200px" mode="ajax"
+ <rich:panelMenu style="width:200px" mode="ajax"
groupMode="ajax"
iconExpandedGroup="disc" iconCollapsedGroup="disc"
- iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
+ iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
iconCollapsedTopGroup="chevronDown"
- activeItem="#{panelMenuBean.current}">
+ itemChangeListener="#{panelMenuBean.updateCurrent}">
<rich:panelMenuGroup label="Group 1">
- <rich:panelMenuItem label="Item 1.1">
- <f:param name="current" value="Item 1.1" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 1.2">
- <f:param name="current" value="Item 1.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 1.3">
- <f:param name="current" value="Item 1.3" />
- </rich:panelMenuItem>
+ <rich:panelMenuItem label="Item 1.1" name="Item_1_1"/>
+ <rich:panelMenuItem label="Item 1.2" name="Item_1_2"/>
+ <rich:panelMenuItem label="Item 1.3" name="Item_1_3"/>
</rich:panelMenuGroup>
<rich:panelMenuGroup label="Group 2">
- <rich:panelMenuItem label="Item 2.1">
- <f:param name="current" value="Item 2.1" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.2">
- <f:param name="current" value="Item 2.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.3">
- <f:param name="current" value="Item 2.3" />
- </rich:panelMenuItem>
+ <rich:panelMenuItem label="Item 2.1" name="Item_2_1"/>
+ <rich:panelMenuItem label="Item 2.2" name="Item_2_2"/>
+ <rich:panelMenuItem label="Item 2.3" name="Item_2_3"/>
<rich:panelMenuGroup label="Group 2.4">
- <rich:panelMenuItem label="Item 2.4.1">
- <f:param name="current" value="Item 2.4.1" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.4.2">
- <f:param name="current" value="Item 2.4.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.4.3">
- <f:param name="current" value="Item 2.4.3" />
- </rich:panelMenuItem>
+ <rich:panelMenuItem label="Item 2.4.1"
name="Item_2_4_1"/>
+ <rich:panelMenuItem label="Item 2.4.2"
name="Item_2_4_2"/>
+ <rich:panelMenuItem label="Item 2.4.3"
name="Item_2_4_3"/>
</rich:panelMenuGroup>
- <rich:panelMenuItem label="Item 2.5">
- <f:param name="current" value="Item 2.5" />
- </rich:panelMenuItem>
+ <rich:panelMenuItem label="Item 2.5" name="Item_2_5"/>
</rich:panelMenuGroup>
<rich:panelMenuGroup label="Group 3">
- <rich:panelMenuItem label="Item 3.1">
- <f:param name="current" value="Item 3.1" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 3.2">
- <f:param name="current" value="Item 3.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 3.3">
- <f:param name="current" value="Item 3.3" />
- </rich:panelMenuItem>
+ <rich:panelMenuItem label="Item 3.1" name="Item_3_1"/>
+ <rich:panelMenuItem label="Item 3.2" name="Item_3_2"/>
+ <rich:panelMenuItem label="Item 3.3" name="Item_3_3"/>
</rich:panelMenuGroup>
</rich:panelMenu>
- <rich:panel bodyClass="rich-laguna-panel-no-header">
<a4j:outputPanel ajaxRendered="true">
+ <rich:panel rendered="#{not empty panelMenuBean.current}">
<h:outputText value="#{panelMenuBean.current} selected"
id="current" />
- </a4j:outputPanel>
</rich:panel>
+ </a4j:outputPanel>
</h:panelGrid>
</h:form>
</ui:composition>
\ No newline at end of file
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/togglePanel/samples/simple-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/togglePanel/samples/simple-sample.xhtml 2010-12-06
14:11:23 UTC (rev 20404)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/togglePanel/samples/simple-sample.xhtml 2010-12-06
15:27:17 UTC (rev 20405)
@@ -19,7 +19,7 @@
}
</style>
<h:form>
- <rich:togglePanel id="panel1" activeItem="item1"
render="tabs">
+ <rich:togglePanel id="panel1" activeItem="item1"
render="tabs" itemChangeListener="#{panelMenuBean.updateCurrent}">
<rich:togglePanelItem name="item1">
<p>This toggle panel switches in Ajax mode. So only one active
item loaded to the client.</p>
Show replies by date