Problem by rich:modalPanel with facelets
darmstadter Feb 6, 2008 6:43 AMConfiguration: richfaces 3.1.3-GA, jsf-facelets 1.1.12
Problem: The modalPanel is in the Tree.xhtml. When you click the node of the tree, modalPanel shows with information of the node. It works well. But
i want to dividing the file into two files with facelets. i put the modalPanel in a special file named PropertiesModalPanel.xhtml, the modalPanel can not be rerendered. Thanks a lots for your answers.
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<rich:modalPanel id="detailsMp" width="400" height="420" zindex="2000">
<f:facet name="header">
Details
</f:facet>
<f:facet name="controls">
<a href="#" onclick="Richfaces.hideModalPanel('detailsMp')">X</a>
</f:facet>
<a4j:outputPanel id="modalContent" layout="inline">
<h:panelGrid columns="2">
<h:outputText value="First Name:"/>
<h:outputText value="#{ctrl.selectedDevicePhysName}"/>
</h:panelGrid>
<a href="#" onclick="Richfaces.hideModalPanel('detailsMp')">Close</a>
</a4j:outputPanel>
</rich:modalPanel>
<rich:tree id="TreeNav_Tree1" value="#{ctrl.treeNavData}" var="item" nodeFace="#{item.type}"
switchType="ajax" binding="#{ctrl.treeNavBinding}">
<rich:treeNode id="TreeNav_TreeNode1" type="ZoneNode" selectedClass="UnvisibleBox">
<h:outputText value="#{item.name}" id="text"/>
</rich:treeNode>
<rich:treeNode id="TreeNav_TreeNode2" type="DeviceNode" iconLeaf="#{item.iconPath}"
icon="#{item.iconPath}" selectedClass="UnvisibleBox" >
<a4j:commandLink value="" reRender="detailsMp,modalContent,panelbar"
actionListener="#{ctrl.deviceSelected}"
oncomplete="Richfaces.showModalPanel('detailsMp')">
<f:param name="devicePhysName" value="#{item.dataItem.physName}" />
<h:outputText id="DeviceName" value="#{item.name}"/>
</a4j:commandLink>
</rich:treeNode>
</rich:tree>
</ui:composition>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:ui="http://java.sun.com/jsf/facelets">
<rich:modalPanel id="detailsMp" width="400" height="420" zindex="2000">
<f:facet name="header">
Details
</f:facet>
<f:facet name="controls">
<a href="#" onclick="Richfaces.hideModalPanel('detailsMp')">X</a>
</f:facet>
<a4j:outputPanel id="modalContent" layout="inline">
<h:panelGrid columns="2">
<h:outputText value="Device Name:"/>
<h:outputText value="#{ctrl.selectedDevicePhysName}"/>
</h:panelGrid>
<a href="#" onclick="Richfaces.hideModalPanel('detailsMp')">Close</a>
</a4j:outputPanel>
</rich:modalPanel>
</ui:composition>