使用jQuery打开和关闭richfaces模式面板
我在项目中使用richfaces,出于某些需要,我必须在单击div后显示一个弹出窗口。 如何使用jQuery打开和关闭richfaces模式面板 panel.jsp:使用jQuery打开和关闭richfaces模式面板,jquery,jsf,richfaces,Jquery,Jsf,Richfaces,我在项目中使用richfaces,出于某些需要,我必须在单击div后显示一个弹出窗口。 如何使用jQuery打开和关闭richfaces模式面板 panel.jsp: <rich:modalPanel id="controlWorkflowEditor" width="430" trimOverlayedElements="false" resizeable="false" autosized="true"> <f:facet name="header">
<rich:modalPanel id="controlWorkflowEditor" width="430"
trimOverlayedElements="false" resizeable="false" autosized="true">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{bpmnEditorLocal['choisirUnWorkflow']}">
</h:outputText>
</h:panelGroup>
</f:facet>
<h:form id="controlWorkflow">
<h:panelGroup id="controlGroupPanelId">
<table>
<!-- ######### WORKFLOW CONTROL EDITOR ############ -->
<tr>
<td><h:outputLabel value="#{bpmnEditorLocal['workflow']} *" />
</td>
</tr>
</table>
</h:panelGroup>
<br />
<br />
</h:form>
</rich:modalPanel>
在RichFaces 3.x中,可以使用javascript显示/隐藏模式面板:
展示:
或
隐藏:
或
例如:
<h:graphicImage value="/images/icons/close.png" style="cursor:pointer"
onclick="Richfaces.hideModalPanel('modalPanelId')" />
在RichFaces 3中,您可以在javascript中使用RichFaces.showModalPanel('modalPanelId')
。第二种方法是调用{rich:component('modalPanelId')}.show()
#{rich:component('modalPanelId')}.show()
Richfaces.hideModalPanel('modalPanelId')
#{rich:component('popup')}.hide()
<h:graphicImage value="/images/icons/close.png" style="cursor:pointer"
onclick="Richfaces.hideModalPanel('modalPanelId')" />