3 Replies Latest reply on Oct 24, 2007 2:00 PM by Joca Java

    Problems with ModalPanel RichFaces!

    Joca Java Newbie

      Hi,

      i´m trying to use the ModalPane RichFaces...

      when my modalPane is open, i call an action that update a value.

      But, when the action ends, and return, my modalPane close...

      The value was updated, but i would like to continue open modalPane.

      My faces-config:

       <navigation-rule>
       <from-view-id>/paginas/login/login.xhtml</from-view-id>
       <navigation-case>sucesso</navigation-case>
       <to-view-id>/paginas/login/login.xhtml</to-view-id>
       </navigation-rule>
      


      My page:
      <?xml version="1.0" encoding="ISO-8859-1"?>
       <!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="https://ajax4jsf.dev.java.net/ajax"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich">
       <body>
       <f:view>
       <h:outputText value="Seja bem-vindo(a) #{logado}" styleClass="accept"/>
       <a href="javascript:Richfaces.showModalPanel('inserirProva',{heigth:600 ,width:900, top:25})">Cadastrar</a>
       <rich:modalPanel id="inserirProva" minHeigth="200" minWidth="450" height="600" width="900" zindex="2000" showWhenRendered="true" keepVisualState="true">
       <f:facet name="header">
       <h:outputText value="Cadastrar Prova" />
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/images/modal/close.png" onclick="Richfaces.hideModalPanel('inserirProva')" />
       </f:facet>
       <a4j:form ajaxSubmit="true" reRender="teste">
       <table width="100%" border="1">
       <tr>
       <td>Tipo de Prova :
       <h:selectOneMenu id="tipos" value="#{prova.tipoQuestao}">
       <f:selectItems value="#{prova.tipos}"/>
       </h:selectOneMenu>
       <h:outputText id="teste" value="#{prova.teste}"/>
       </td>
       </tr>
       <tr>
       <td>
       <a4j:commandButton value="Atualizar Lista" action="#{prova.atualiza}"/>
       </td>
       </tr>
       </table>
       </a4j:form>
       </rich:modalPanel>
       </f:view>
       </body>
       </html>
      


      Sorry my english... i´m brazilian... thanks!