1 Reply Latest reply on Apr 14, 2008 6:02 PM by Sergey Smirnov

    Help ...

    Andreina T Newbie

      Hi, I'm using richfaces 3.1 with myfaces 1.1.3 and I'm having problems with a modalPanel,
      this is the code of the page using the modalPanel

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <%@taglib uri="http://richfaces.org/rich" prefix="rich"%>
      
      
      
      
      <h:form>
       <rich:modalPanel id="panel" width="600" height="400">
       <f:facet name="header">
       <h:outputText value="Nueva Categoria"/>
       </f:facet>
       <f:facet name="controls">
      
       <a4j:commandLink value="X" onclick="Richfaces.hideModalPanel('form:panel')" />
      
       </f:facet>
      
      <h:outputText value="#{bundle.category_add_title}" />
      
      
      
       <t:outputText value="#{bundle.category_name}" />
      
       <t:inputText size="100" value="#{categoryForm.category.name}" id="category_name" />
      
       <t:outputText value="#{bundle.category_text}" />
      
       <t:inputTextarea value="#{categoryForm.category.text}" cols="100" rows="15" id="category_text" />
       <t:inputHidden value="#{categoryForm.category.categoryID}" />
      
       <t:commandButton action="pruebita" value="#{bundle.btn_save}" />
       <t:commandButton action="listCategories" value="#{bundle.btn_cancel}" />
      
      
      
      </rich:modalPanel>
      <h:commandLink value="Agregar Categorias" onclick ="Richfaces.showModalPanel('panel');"/>
      
      </h:form>
      
      


      The problem is that every time push the save button (<t:commandButton action="pruebita" value="#{bundle.btn_save}" />
      ) The modalPanel get closed and did not execute the action of the button

      the documentation says "modalPanel must not be included into the form (on any level up) if it has the form inside." and I'm breaking that rule because if I don't put it inside a form it just doesn't work

      I don't Know if anybody has a clue of what could be happening I little help, advice, suggestion it would be great

      Thanks in advanced