7 Replies Latest reply on Nov 3, 2008 2:29 AM by cremersstijn

    Modalpanel disappears always

    cremersstijn

      I'm doing some validation on my modalpanel. I'm using this pattern: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061517

      But my modalpanel hides always, even if i do an a4j:commandButton.

      I'm using the latest version (3.2.2.GA).

      Greetz

        • 1. Re: Modalpanel disappears always
          cremersstijn

          Does somebody have the same problem?

          I think it is a bug, because i just the same pattern in an older version of richfaces and there it worked fine.

          • 2. Re: Modalpanel disappears always
            jiri.pejchal

            I'm probably experiencing the same issue. myfaces + facelets. Older version works just fine.

            • 3. Re: Modalpanel disappears always
              ilya_shaikovsky

              Guys show your code please.

              • 4. Re: Modalpanel disappears always
                cremersstijn

                The .xhtml page where i call the popup:

                <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <ui:composition ...>
                
                <ui:define name="body">
                
                
                
                 <h:messages globalOnly="true" styleClass="message"/>
                
                 <h:form id="zipRangesForm">
                
                 <rich:panel header="#{msg.configureCountryZipRanges_configureCountryZipRanges}">
                 ...
                 <div class="actionButtons">
                 <a4j:commandButton
                 value="#{msg.configureCountryZipRanges_addNewZipRange}"
                 action="#{configureCountryBean.loadCountryRegionZipPopup}"
                 reRender="countryRegionZipPopupPanel"
                 ajaxSingle="true"
                 oncomplete="#{rich:component('countryRegionZipPopup')}.show()" />
                 </div>
                 ...
                 </rich:panel>
                
                 </h:form>
                
                 <a4j:include viewId="countryRegionZipPopup.xhtml"/>
                 <a4j:include viewId="countrySubRegionZipPopup.xhtml"/>
                </ui:define>
                
                </ui:composition>



                The .xhtml with the popup
                <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:rich="http://richfaces.org/rich"
                 xmlns:a4j="http://richfaces.org/a4j">
                
                <rich:modalPanel
                 id="countryRegionZipPopup"
                 minHeight="200"
                 minWidth="400"
                 height="200"
                 width="400"
                 left="100"
                 top="100"
                 resizeable="false"
                 onshow="#{rich:element('countryRegionZipZipCodeFrom')}.focus();">
                
                 <f:facet name="header">
                 <h:outputText value="#{msg.countryRegionZipPopup_addNewZipRange}" />
                 </f:facet>
                
                 <f:facet name="controls">
                 <h:panelGroup>
                 <h:graphicImage value="#{msg.img_close}" style="cursor:pointer" id="countryRegionZipHideLink"/>
                 <rich:componentControl for="countryRegionZipPopup" attachTo="countryRegionZipHideLink" operation="hide" event="onclick"/>
                 </h:panelGroup>
                 </f:facet>
                
                 <h:form id="countryRegionZipPopupForm">
                 <h:panelGroup id="countryRegionZipPopupPanel">
                 <h:panelGrid column="1">
                 <h:panelGroup>
                 <span class="name">#{msg.fromZip} *</span>
                 <span class="value">
                 <h:inputText value="#{configureCountryBean.newCountryRegionZip.zipCodeFrom}" id="countryRegionZipZipCodeFrom" required="true"/>
                 </span>
                 <rich:message for="countryRegionZipZipCodeFrom"/>
                 </h:panelGroup>
                 <h:panelGroup>
                 <span class="name">#{msg.toZip} *</span>
                 <span class="value">
                 <h:inputText value="#{configureCountryBean.newCountryRegionZip.zipCodeTo}" id="countryRegionZipZipCodeTo" required="true"/>
                 </span>
                 <rich:message for="countryRegionZipZipCodeTo"/>
                 </h:panelGroup>
                 </h:panelGrid>
                
                 <div class="actionButtons">
                 <a4j:commandButton
                 value="#{msg.cancel}"
                 action="#{configureCountryBean.closeCountryRegionZipPopup}"
                 oncomplete="#{rich:component('countryRegionZipPopup')}.hide()"/>
                    
                 <a4j:commandButton
                 value="#{msg.ok}"
                 action="#{configureCountryBean.addNewCountryRegionZip}"
                 reRender="zipRegionsPanel,countryRegionZipPopupPanel"
                 oncomplete="if (!ajaxRequestContainsErrors()){ Richfaces.hideModalPanel('countryRegionZipPopup');}else{Richfaces.showModalPanel('countryRegionZipPopup');};"/>
                 </div>
                 </h:panelGroup>
                 </h:form>
                
                
                </rich:modalPanel>
                </ui:composition>
                


                • 5. Re: Modalpanel disappears always
                  cremersstijn

                  the libraries i use:
                  - jsf-api 1.2_08
                  - jsf-impl 1.2_08
                  - jsf-facelets 1.1.14
                  - richfaces-api 3.2.2.GA
                  - richfaces-impl 3.2.2.GA
                  - richfaces-ui 3.2.2.GA
                  - darkX-3.2.2.GA

                  The application server is websphere 6.1

                  • 6. Re: Modalpanel disappears always
                    nbelaevski
                    • 7. Re: Modalpanel disappears always
                      cremersstijn

                      it works now, thank you guys