Rich:modalPanel - Apareçe e desapareçe logo!

Boas,

O meu modal panel deve aparecer depois de eu clicar num botão criar no meu site, mas ele deve aparecer e manter-se. Neste momento ele aparece e desaparece em 1 segundo. Agradecia ajuda.

código xhtml:

[code]<rich:panel
style=“text-align: center;border-style:none;background-color: transparent; height: 100px; width:200px;“
rendered=”#{novaMensagem.mostraReg==true}”>

						<rich:dataTable id="table" var="reg"
							value="#{novaMensagem.registosDisponiveis}" rowClasses="cur"
							align="center">
							<h:column>
								<f:facet name="header">Registos</f:facet>
								<h:outputText value="#{reg.nome}"></h:outputText>
							</h:column>

							<h:column>
								<f:facet name="header">Adicionar</f:facet>
								<center>
									<a4j:commandButton value="adicionar" image='img/addd.png'
										action="#{novaMensagem.adicionaRegisto(reg)}"
										reRender="panel">
										<rich:toolTip>
											<span style="white-space: nowrap"> Adicionar Registo
											</span>
										</rich:toolTip>
									</a4j:commandButton>
								</center>
							</h:column>

						</rich:dataTable>

						<h:commandButton id="criar" value="criar"
							action="#{novaMensagem.criar}"
							rendered="#{novaMensagem.mostraReg==true}"
							image="/img/criar.png"
							style="BACKGROUND-COLOR: transparent; FONT-WEIGHT: bold; FONT-SIZE: small; COLOR: #ffffff;height : 50px; width : 52px;">
							<rich:componentControl for="mPanel" attachTo="criar"
								operation="show" event="onclick" />
							<rich:toolTip>
								<span style="white-space: nowrap">Criar Mensagem</span>
							</rich:toolTip>
						</h:commandButton>

						<rich:modalPanel id="mPanel" width="350" height="100">
							<f:facet name="header">
								<h:panelGroup>
									<h:outputText value="Modal Panel"></h:outputText>
								</h:panelGroup>
							</f:facet>
							<f:facet name="controls">
								<h:panelGroup>
									<h:graphicImage value="/images/modal/close.png"
										styleClass="hidelink" id="hidelink" />
									<rich:componentControl for="mPanel" attachTo="hidelink"
										operation="hide" event="onclick" />
								</h:panelGroup>
							</f:facet>
							<h:outputText
								value="This panel is called using Component Control Component"></h:outputText>
							<br />
							<h:outputText
								value="Closure link (X) works also through Component Control"></h:outputText>
						</rich:modalPanel>
					</rich:panel>

[/code]

Cumprimentos,

guga08, segundo a documentação do richFaces, o modal panel deve ficar fora do form original, e é recomendável ele possuir seu próprio <h:form>. Tenta fazer isso e veja se resolve.

[quote]Important:
To work properly, the rich:modalPanel should always be placed outside the original <h:form>. For performing submits from within the rich:modalPanel it must include its own <h:form>.
In order to avoid a bug in IE, the root node of the dialog is moved on the top of a DOM tree.
[/quote]
fonte: http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_modalPanel.html