关闭我面临着同样的问题,因为这里所描述Rich modalpanel closes automatically丰富modalpanel自动
我使用RichFaces的3.3.0(包含在缝2.12)。我试图隔离这个问题,Firebug显示在modalpanel出现后,会生成对服务器的请求。数小时后面板关闭。我为rich_modalPanel标签(在表单外部)处理了几个位置。
任何想法?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 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:rich="http://richfaces.org/rich"
xmlns:a="http://richfaces.org/a4j"
xmlns:s="http://jboss.com/products/seam/taglib">
<head />
<body id="pgHome">
<f:view>
<div id="document">
<h:form id="login">
<fieldset>
<h:outputLabel id="UsernameLabel" for="username">Login Name</h:outputLabel>
<h:inputText id="username" value="#{identity.username}" style="width: 175px;" />
</fieldset>
<h:commandButton id="search2" value="modal"
onclick="#{rich:component('mp')}.show()" />
</h:form>
<rich:modalPanel id="mp" height="200" width="500">
<f:facet name="header">
<h:outputText value="Modal Panel Title" />
</f:facet>
</rich:modalPanel>
</div>
</f:view>
</body>
</html>
编辑:
我终于用这个例子:
<rich:modalPanel id="modalPanelID">
<f:facet name="header">
<h:outputText value="header" />
</f:facet>
<a onclick="Richfaces.hideModalPanel('modalPanelID');" href="#">Hide</a>
</rich:modalPanel>
<a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">Show</a>
应该当你按下按钮打开,如'的onclick =“#declaed面板。{丰富:成分( 'MP')}秀( )“' – 2010-11-08 18:12:48