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,