how can i load po:menu dynamically with several levels, from a list in a bean?
In my current project i use a p:tree, now i want to improve the layout with Omega but i don't know how to update this code:
Code: Select all
<p:tree id="placesTree" value="#{measurementBean.placesRoot}"
var="node" selectionMode="single"
selection="#{measurementBean.selectedNode}" dynamic="true"
animate="true" cache="true" widgetVar="placesTree"
style="margin-top: 42px; width: 200px; height: 515px;">
<p:ajax event="select"
listener="#{measurementBean.onPlaceTreeNodeSelect}"
onstart="PF('bui').block()" oncomplete="PF('bui').unblock()"
update=":measurementsForm:infoTabs:initMeasurementsCharts,
:measurementsForm:infoTabs:lastMeasurementsPhaseContainer,
:measurementsForm:infoTabs:dailyPhaseContainer,
:measurementsForm:infoTabs:weeklyPhaseContainer,
:measurementsForm:infoTabs:monthlyPhaseContainer"/>
<p:ajax event="expand"
listener="#{measurementBean.onPlaceTreeNodeExpand}" />
<p:treeNode type="#{MeasurementBean.PLACE_NODE}"
icon="ui-icon-home">
<h:outputText value="#{node.name}" />
</p:treeNode>
<p:treeNode type="#{MeasurementBean.METER_DEVICE_NODE}"
icon="ui-icon-meter">
<h:outputText value="#{node.name}" />
</p:treeNode>
</p:tree>