-
1. Panel side bar menu with tree view and dymanic menu items
ilya_shaikovsky Mar 30, 2011 5:36 AM (in response to jobmathew)First problem am facing is i dont know how to navigate to a different page when selecting an item from tree view togather with sending the id of tree node .
just use render attribute to update the content part like there (http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?tab=dnd&cid=402622) unfortunatelly has no 4.x sample but ti should be easy to adopt.
second problem is i dont know how to add dynamic menu items and to navigateto different pages with parameters of the menu item.
-
2. Re: Panel side bar menu with tree view and dymanic menu items
jobmathew Mar 30, 2011 3:51 PM (in response to ilya_shaikovsky)i have created a below template and when clicking on side menu which contains tree view or menu items from the pannel menu.
i want to update only the mainDisplay area. is it possible ????
currently what am doing is i make an action which call a function in the bean and return a string value which is given in the faces-config and will redirect to corresponding page which uses the below template.
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
contentType="text/html">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Welcome </title>
</head>
<body>
<div id="wrapper">
<div id="header">
<div align="right" id= "menu">
<ui:include name="menu" src="/Resource/HeaderToolbar.xhtml" />
</div>
</div>
<rich:panel>
<table border="0">
<tr>
<th valign="top" width="350px"><ui:include name="menu" src="/Resource/SideBarMenu.xhtml" /></th>
<td valign="top" width="100%"><ui:insert name="mainDisplay" /></td>
</tr>
</table>
</rich:panel>
<div id="footer" align="center">
<rich:panel>
<h:outputText value="Copyright © 2011." />
</rich:panel>
</div>
</div>
<ui:debug hotkey="c" rendered="true"/>
</body>
</html>
</f:view>
-
3. Re: Panel side bar menu with tree view and dymanic menu items
ilya_shaikovsky Mar 31, 2011 3:42 AM (in response to jobmathew)probably you should use not insert but include.. Then you will be able to change included pages rendering parent component for that include.
-
4. Re: Panel side bar menu with tree view and dymanic menu items
jobmathew Mar 31, 2011 3:56 AM (in response to ilya_shaikovsky)if i am using include i have to use the "src" attribute and say excatly which page should be included right.
then how this page as my template for other pages !!!