Open rich:modalPanel by rich:panelMenuItem
uwe72 Jan 31, 2011 12:07 PMHello,
how can i open a modalPanel(Dialog) within a panelMenuItem?
I have something like that:
My MenuItem:
<rich:panelMenuItemid="chooseActionplanType_btn22"
value="#{msg.newItem}"title="#{msg.newItem}"label="#{msg.newItem}"
oncomplete="Richfaces.showModalPanel('mainController_chooseCreateActionplanTypeModalPanel')"/>
With this menuItem i want to open a modal dialog like this:
<ui:composition 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:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:richx="http://richfaces.org/richx">
<rich:modalPanelid="mainController_chooseCreateActionplanTypeModalPanel"width="600"
height="180"autosized="true">
<f:facet name="header">#{msg.chooseActionplanTypeTitle}</f:facet>
<h:form id ="test2">
<h:outputLabelstyleClass="Text"for="description"
value="#{msg.chooseActionplanType}"/>
<h:selectOneRadioid="RadioComponent_1"
value="#{mainController.selectedCreationType}"
layout="pageDirection">
<f:selectItemid="creationTypeStandard"
itemLabel="#{msg.Structure_Standard}"
itemValue="creationTypeStandard"/>
<f:selectItemid="creationTypeAutomatise"
itemLabel="#{msg.Structure_Automatise}"
itemValue="reportIdCustomerOverview"/>
</h:selectOneRadio>
<ui:decoratetemplate="/layout/button.xhtml">
<ui:definename="button">
<h:commandButtonid="btnStartCreateActionplan"
value="#{msg.create}"title="#{msg.create}"
action="#{mainController.doCreateActionplan}"
onclick="Richfaces.hideModalPanel('mainController_chooseCreateActionplanTypeModalPanel')"/>
<a4j:commandButtonvalue="#{msg.cancel}"title="#{msg.cancel}"
onclick="Richfaces.hideModalPanel('mainController_chooseCreateActionplanTypeModalPanel')"/>
</ui:define>
</ui:decorate>
</h:form>
</rich:modalPanel>
</ui:composition>
But the dialog is not shown. What i am doing wring?
Thanks!!!!
Uwe