modalPanel disappears after a second
nschweig Feb 18, 2010 5:41 AMHi,
I have got a problem with modalPanels. It disappears after a second.
I use RichFaces 3.2.2GA, JBoss 5.0.1GA and Facelets 1.5.15B1.
I have got a facelets-template:
<!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:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CMT</title>
<base href="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.requestContextPath}/"/>
<link rel="stylesheet" type="text/css" href="css/cmt.css" />
<f:loadBundle basename="de.bundle.resources" var="rs"/>
<f:loadBundle basename="de.bundle.messages" var="msg"/>
</head>
<body>
<div align="center" id="base" >
<div id="background" align="left">
<div id="header">
<ui:insert name="header">
<ui:include src="../inc/header.xhtml"/>
</ui:insert>
<div id="headerinfo">
<ui:insert name="headerinfo">
<ui:include src="../inc/headerinfo.xhtml"/>
</ui:insert>
</div>
</div>
<ui:insert name="menu">
<ui:include src="../inc/menu.xhtml" />
</ui:insert>
<div id="content">
<ui:insert name="content">Place for content </ui:insert>
</div>
</div>
</div>
</body>
</html>
In the "content" div there is my document that contains the modelPanel:
showCourses.xhtml
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
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:ns="http://www.cmt.de/jsf"
template="/app/templates/basic.xhtml">
<ui:define name="content">
<a4j:form>
<rich:modalPanel id="deleteCourse" minHeight="150" minWidth="200"
height="150" width="200" zindex="2000">
<f:facet name="header">
<h:outputText value="#{rs.course_delete}" />
</f:facet>
<f:facet name="controls"> </f:facet>
<h:outputText value="#{rs.confirm_course_delete}" /><br /><br />
<h:commandButton action="#{courseBean.deleteCourse}" value="#{rs.delete}" onclick="#{rich:component('deleteCourse')}.hide()" styleClass="confirm_text_buttons"/>
 
<h:commandButton onclick="#{rich:component('deleteCourse')}.hide()" value="#{rs.cancel}" styleClass="confirm_text_buttons"/>
</rich:modalPanel>
</a4j:form>
<h:form>
...
<rich:dataTable value="#{courseBean.coursesForInstructor}" var="course" ..
<h:column>
<h:commandLink alt="#{rs.delete}" action="#{courseBean.noticeId}" onclick="#{rich:component('deleteCourse')}.show()">
<f:param name="courseId" value="#{course.id}" />
</h:commandLink>
</h:column>
</rich:dataTable>
</h:form>
</ui:define>
</ui:composition>
Do you have any ideas for me?
Thank you a lot!
Nickei