reRender, oncomplete and modalPanel
victormenegusso May 17, 2011 3:24 PMHello
I'm having the following problem, I have a button to perform an action and an open modalpanel, but the modalpanel is not open,
code:
<ui:composition 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"> <h:form id="form" > <rich:panel id="atividade" style="width:80%; height:100%; float: right; display: block;"> <a4j:commandLink action="#{atividade.BotaoBuscaEntrada_evento}" reRender="evento_form" oncomplete="javascript:Richfaces.showModalPanel('evento_panelselecionaentrada');"> <h:graphicImage url="/imagens/sinal_lista.png" style="border:0px; border-color:white;"/> </a4j:commandLink> <rich:panel style="width:500px; height:622px; background-color:rgb(240,240,240); " id="atividade_evento" > ..... </rich:panel> </rich:panel> </h:form> <rich:modalPanel id="evento_panelselecionaentrada" autosized="true" keepVisualState="false" > <f:facet name="header"> <h:outputText value="Escolha ocorrencia"/> </f:facet> <f:facet name="controls"> <a4j:commandLink onclick="javascript:Richfaces.hideModalPanel('evento_panelselecionaentrada')"> <h:graphicImage url="/imagens/fechar.png"></h:graphicImage> </a4j:commandLink> </f:facet> <a4j:form id="evento_form" > ...... <a4j:commandButton value="UTILIZAR" action="#{atividade.botaoEntradaSelecionada_evento}" reRender="atividade" oncomplete="javascript:alert('va');"></a4j:commandButton> </a4j:form> </rich:modalPanel> </ui:composition>
thanks