1 2 Previous Next 15 Replies Latest reply on Jan 15, 2009 9:10 AM by Ilya Shaikovsky

    Rich modalpanel closes automatically

    Onur Kocer Newbie

      Hi everyone
      i am in trouble about modal panels.
      In a model panel i have two h:selectOneMenu. Second selectOneMenu is relative to first one
      when user selects a value from first one, second one is rerendered but modalpanel closes automatically.

      <h:selectOneMenu value ="#{myBean.selectedValue}"
      <s:selectItems value="#{cars}"
      noSelectionLabel="Default ... "/>
      <a:support event="onchange" reRender="secondOne" />
      </h:selectOneMenu>

      <h:selectOneMenu id = "secondOne" value ="#{myBean.selectedValue2}"
      <s:selectItems value="#{colors}"
      noSelectionLabel="Default ... "/>
      </h:selectOneMenu>


      when i start program after choosing value from first selectOneMenu modalPanel closes and if i open modalPanel i again i can see that secon selectOneMenu has the right values. But how can i prevent modalPanel from closing when i choose a value from first one

      thank you

        • 1. Re: Rich modalpanel closes automatically
          Florian Marwede Expert

          This is a common problem. Please post the full code of the modal panel. The problem is related to what you declare to be rerendered. Search in this forum and in the cookbook...

          • 2. Re: Rich modalpanel closes automatically
            Onur Kocer Newbie

            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:s="http://jboss.com/products/seam/taglib"
            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:as="http://anadolusigorta.com.tr/jsf/comps"
            xmlns:r="http://richfaces.org/rich" xmlns:a="http://richfaces.org/a4j">
            <h:form>
            <h:panelGrid columns="2">
            <s:decorate template="/layout/editNew.xhtml">
            <ui:define name="label">
            <h:outputText value="#{messages['musteri.etiket.baglantiTipi']}" />
            </ui:define>
            <h:selectOneMenu styleClass="large" disabled="#{rgMusMusKisiyeBagliBilgilerHome.cmbBaglantiTipEnabled}"
            value="#{rgMusMusKisiyeBagliBilgilerHome.cmbBaglantiTipiSelectedValue}">
            <f:selectItems
            value="#{rgMusMusKisiyeBagliBilgilerHome.cmbBaglantiTip}" />
            <a:support
            action="#{rgMusMusKisiyeBagliBilgilerHome.baglantiTipiSecildi()}"
            ajaxSingle="true" event="onchange" reRender="indirimKurum">
            </a:support>
            </h:selectOneMenu>
            </s:decorate>
            </h:panelGrid>
            <s:decorate template="/layout/editNew.xhtml">
            <ui:define name="label">
            <h:outputText
            value="#{messages['musteri.etiket.indirimYapilabilecekKurum']}" />
            </ui:define>
            <h:selectOneMenu id="indirimKurum"
            disabled="#{ rgMusMusKisiyeBagliBilgilerHome.cmbKurumEnabled}"
            styleClass="large"
            value="#{rgMusMusKisiyeBagliBilgilerHome.cmbKurumSelectedValue}" >
            <f:selectItems
            value="#{rgMusMusKisiyeBagliBilgilerHome.cmbKisiselKurum}" />
            <a:support action="#{rgMusMusKisiyeBagliBilgilerHome.kurumSecildi()}"
            ajaxSingle="true" event="onchange" />
            </h:selectOneMenu>

            • 3. Re: Rich modalpanel closes automatically
              Onur Kocer Newbie

              Sorry about indentation
              this code is included in a modal panel

              as you can see when we select first selectOneMenu it should rerender second SelectOneMenu but modalpanel is closing automatically

              • 4. Re: Rich modalpanel closes automatically
                Onur Kocer Newbie

                Sorry about indentation
                this code is included in a modal panel

                as you can see when we select first selectOneMenu it should rerender second SelectOneMenu but modalpanel is closing automatically

                • 5. Re: Rich modalpanel closes automatically
                  Onur Kocer Newbie

                  i tried to get over from that error with using <a:region> but it didnt work

                  still i can not understand problem
                  have anyone had an idea?

                  • 6. Re: Rich modalpanel closes automatically
                    Ilya Shaikovsky Master

                    as fmarwede told you please post the whole snippet of the page. If you panel included using a4j:include? then define ajaxRendered false for the include or update your version to 3.3.0.

                    And use code tags around code snippets.

                    • 7. Re: Rich modalpanel closes automatically
                      Onur Kocer Newbie

                      Here it is my modalPanel and as you said i used ajaxRendered=false

                      <!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:s="http://jboss.com/products/seam/taglib"
                       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:r="http://richfaces.ajax4jsf.org/rich"
                       xmlns:a="https://ajax4jsf.dev.java.net/ajax">
                      
                       <r:modalPanel moveable="true" resizeable="false" id="rgMusMusIliskiliMusteriBilgileriPopup"
                       width="850" height="700" zindex="100" >
                      
                       <f:facet name="controls">
                       <h:graphicImage alt="#{messages['form.ikon.kapat']}"
                       title="#{messages['form.ikon.kapat']}" url="/img/form_close.png"
                       styleClass="cursor"
                       onclick="javascript:Richfaces.hideModalPanel('rgMusMusIliskiliMusteriBilgileriPopup')" />
                       </f:facet>
                      
                       <a:include
                       viewId="/module/musteri/region/rgMusMusIliskiliMusteriBilgileri.xhtml" ajaxRendered="false" />
                      
                      
                       </r:modalPanel>
                      
                      </ui:composition>
                      

                      rgMusMusIliskiliMusteriBilgileri.xhtml:
                      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                       xmlns:s="http://jboss.com/products/seam/taglib"
                       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:as="http://anadolusigorta.com.tr/jsf/comps"
                       xmlns:r="http://richfaces.org/rich" xmlns:a="http://richfaces.org/a4j">
                      
                      
                       <s:decorate template="musteriKisiyeBagliBilgilerRegion.xhtml" >
                       <ui:param name="templateHome"
                       value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome}" />
                       </s:decorate>
                      
                       <s:decorate template="musteriIliskiliMusteriyeBagliBilgilerRegion.xhtml" >
                       <ui:param name="templateHome"
                       value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome}" />
                       </s:decorate>
                      
                      </ui:composition>

                      musteriIliskiliMusteriyeBagliBilgilerRegion.xhtml:
                      The problem is in the selectOneMenus above. When i choose from first selectOneMenu modalPanel is closing
                      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                       xmlns:s="http://jboss.com/products/seam/taglib"
                       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:as="http://anadolusigorta.com.tr/jsf/comps"
                       xmlns:r="http://richfaces.org/rich" xmlns:a="http://richfaces.org/a4j">
                       <h:form>
                       <h:panelGrid columns="2">
                      
                       <s:decorate template="/layout/editNew.xhtml">
                       <ui:define name="label">
                       <h:outputText value="#{messages['musteri.etiket.baglantiTipi']}" />
                       </ui:define>
                      
                       <h:selectOneMenu styleClass="large" disabled="#{rgMusMusKisiyeBagliBilgilerHome.cmbBaglantiTipEnabled}"
                       value="#{rgMusMusKisiyeBagliBilgilerHome.cmbBaglantiTipiSelectedValue}">
                       <f:selectItems
                       value="#{rgMusMusKisiyeBagliBilgilerHome.cmbBaglantiTip}" />
                       <a:support
                       action="#{rgMusMusKisiyeBagliBilgilerHome.baglantiTipiSecildi()}"
                       ajaxSingle="true" event="onchange" reRender="indirimKurum">
                       </a:support>
                       </h:selectOneMenu>
                       </s:decorate>
                      
                       <s:decorate template="/layout/editNew.xhtml">
                       <ui:define name="label">
                       <h:outputText value="#{messages['musteri.etiket.sicilNumarasi']}" />
                       </ui:define>
                       <h:inputText
                       disabled="#{rgMusMusKisiyeBagliBilgilerHome.txtSicilNoEditable}"
                       value="#{rgMusMusKisiyeBagliBilgilerHome.sicilNo}"
                       styleClass="medium"
                       maxlength="5" />
                       </s:decorate>
                       </h:panelGrid>
                      
                       <s:decorate template="/layout/editNew.xhtml">
                       <ui:define name="label">
                       <h:outputText
                       value="#{messages['musteri.etiket.indirimYapilabilecekKurum']}" />
                       </ui:define>
                      
                       <h:selectOneMenu id="indirimKurum"
                       disabled="#{ rgMusMusKisiyeBagliBilgilerHome.cmbKurumEnabled}"
                       styleClass="large"
                       value="#{rgMusMusKisiyeBagliBilgilerHome.cmbKurumSelectedValue}" >
                       <f:selectItems
                       value="#{rgMusMusKisiyeBagliBilgilerHome.cmbKisiselKurum}" />
                       <a:support action="#{rgMusMusKisiyeBagliBilgilerHome.kurumSecildi()}"
                       ajaxSingle="true" event="onchange" />
                       </h:selectOneMenu>
                      
                       </s:decorate>
                      
                       <s:div
                       rendered="#{rgMusMusKisiyeBagliBilgilerHome.cmbBirliginBulunduguIlVisible}">
                       <s:decorate template="/layout/editNew.xhtml">
                       <ui:define name="label">
                       <h:outputText
                       value="#{messages['musteri.etiket.indirimYapilabilecekKurum']}" />
                       </ui:define>
                       <h:selectOneMenu styleClass="large"
                       value="#{rgMusMusKisiyeBagliBilgilerHome.cmbBirliginBulunduguIlSelectedValue}"
                       disabled="#{not rgMusMusKisiyeBagliBilgilerHome.cmbBirliginBulunduguIlVisible}">
                       <f:selectItems
                       value="#{rgMusMusKisiyeBagliBilgilerHome.cmbBirliginBulunduguIl}" />
                       </h:selectOneMenu>
                       </s:decorate>
                       </s:div>
                       <a:commandButton styleClass="kucukButton"
                       disabled="#{rgMusMusKisiyeBagliBilgilerHome.btnEkleEnabled}"
                       value="#{messages['form.button.ekle']}"
                       action="#{rgMusMusKisiyeBagliBilgilerHome.ekle()}" reRender="tablo" />
                       <s:div id="tablo">
                       <r:dataTable
                       value="#{rgMusMusKisiyeBagliBilgilerHome.kurumBilgileriModelList}"
                       rowKeyVar="rkv" width="100%" rows="5">
                       <f:facet name="header">
                       <r:columnGroup>
                       <r:column>
                       <h:outputText value="#{messages['musteri.table.seciniz']}" />
                       </r:column>
                       <r:column>
                       <h:outputText value="#{messages['musteri.etiket.baglantiTipi']}" />
                       </r:column>
                       <r:column>
                       <h:outputText value="#{messages['musteri.table.kurum']}" />
                       </r:column>
                       <r:column>
                       <h:outputText value="#{messages['musteri.table.sicilNo']}" />
                       </r:column>
                       </r:columnGroup>
                       </f:facet>
                       <r:column>
                       <h:selectOneRadio>
                       <a:support event="onclick" ajaxSingle="true" action="#{rgMusMusKisiyeBagliBilgilerHome.selectMusteriBilgiTablosu(rkv)}"
                       onsubmit="dataTableSelectOneRadio(this);" />
                       <f:selectItem itemValue= "rkv" />
                       </h:selectOneRadio>
                       </r:column>
                       <r:column>
                       <h:outputText value="#{entity.SECINIZ}" />
                       </r:column>
                       <r:column>
                       <h:outputText value="#{entity.BAGLANTI_TIPI}" />
                       </r:column>
                       <r:column>
                       <h:outputText value="#{entity.KURUM_ADI}" />
                       </r:column>
                       <r:column>
                       <h:outputText value="#{entity.SICIL_NO}" />
                       </r:column>
                       <f:facet name="footer">
                       <r:datascroller
                       rendered="#{rgMusMusKisiyeBagliBilgilerHome.kurumBilgileriModelList.size > 5}" />
                       </f:facet>
                      
                       </r:dataTable>
                       </s:div>
                      
                       <h:commandButton styleClass="kucukButton"
                       disabled="#{not rgMusMusKisiyeBagliBilgilerHome.btnSilEnabled}"
                       value="#{messages['form.button.sil']}" />
                       <h:commandButton styleClass="kucukButton"
                       disabled="#{not rgMusMusKisiyeBagliBilgilerHome.btnGuncelleEnabled}"
                       value="#{messages['form.button.guncelle']}" />
                       </h:form>
                      </ui:composition>

                      I am waiting for your help
                      Thank you

                      • 8. Re: Rich modalpanel closes automatically
                        Ilya Shaikovsky Master

                        About the first one snippet where the modal declared. how this one is included to the parent view?

                        • 9. Re: Rich modalpanel closes automatically
                          Onur Kocer Newbie

                           

                          <!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:s="http://jboss.com/products/seam/taglib"
                           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:as="http://anadolusigorta.com.tr/jsf/comps"
                           xmlns:r="http://richfaces.org/rich" xmlns:a="http://richfaces.org/a4j"
                           template="/layout/templateNew.xhtml">
                          
                           <ui:define name="content">
                           <h:form id="form">
                           <r:panel>
                           <h:messages globalOnly="true" styleClass="message" />
                           <f:facet name="header">
                           <h:outputLabel styleClass="medium"
                           value="#{messages['musteri.musMusTcDeYerlesikOlmayanTuzelKisi.baslik']}" />
                           </f:facet>
                           <h:panelGrid columns="3" width="1085">
                           <s:fragment>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText value="#{messages['musteri.table.unvani']}" />
                           </ui:define>
                           <h:inputText
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.unvan}"
                           styleClass="xlarge" />
                           </s:decorate>
                           <s:decorate rendered="true" disabled="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.vknBostur}">
                           <h:selectBooleanCheckbox
                           value="false">
                           <a:support event="onchange" ajaxSingle="true" reRender="unvan" />
                           </h:selectBooleanCheckbox>
                           <h:outputText
                           value="#{messages['musteri.etiket.sorguSonucu']}" />
                           </s:decorate>
                           <s:decorate>
                           <h:selectBooleanCheckbox
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.kurumsalMusteri}">
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectBooleanCheckbox>
                           <h:outputText
                           value="#{messages['musteri.etiket.musteriKurumsaldir']}" />
                           </s:decorate>
                           <s:decorate template="/layout/editNew.xhtml" id="unvan">
                           <ui:define name="label">
                           <h:outputText value="#{messages['musteri.table.unvani']}" />
                           </ui:define>
                           <h:inputText
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.unvan}"
                           styleClass="xlarge" />
                           </s:decorate>
                           </s:fragment>
                           <s:fragment>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText
                           value="#{messages['musteri.etiket.vergiKimlikNumarasi']}" />
                           </ui:define>
                           <h:inputText
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.vkn}"
                           styleClass="small" />
                           </s:decorate>
                           <s:decorate>
                           <h:selectBooleanCheckbox
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.temsilciligiVar}">
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectBooleanCheckbox>
                           <h:outputText
                           value="#{messages['musteri.etiket.turkiyedeTemsilciligiVardir']}" />
                          
                           </s:decorate>
                           </s:fragment>
                           <s:fragment>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText value="#{messages['musteri.etiket.ulke']}" />
                           </ui:define>
                          
                          
                           <h:selectOneMenu styleClass="small"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.ulke}">
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.ulkeList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectOneMenu>
                          
                          
                           </s:decorate>
                          
                          
                          
                           <s:decorate template="/layout/editValidate.xhtml">
                           <ui:param name="insertId" value="kktc" />
                           <ui:define name="label">
                           <h:outputText value="#{messages['musteri.etiket.kktcKimlikNo']}" />
                           </ui:define>
                           <h:inputText id ="kktc" onkeydown="return onlyInteger(event)"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.kktcKimlikNo}"
                          
                           styleClass="large" maxlength="10">
                           <r:ajaxValidator event="onblur" />
                           </h:inputText>
                           </s:decorate>
                          
                          
                           <s:decorate template="/layout/editValidate.xhtml">
                           <ui:param name="insertId" value="infoMessage" />
                           <h:outputText id ="infoMessage"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.vkn}"
                           styleClass="large" maxlength="10">
                           </h:outputText>
                           </s:decorate>
                          
                           </s:fragment>
                           </h:panelGrid>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText
                           value="#{messages['musteri.etiket.musterimizinTercihSebebi']}" />
                           </ui:define>
                          
                          
                          
                          
                           <h:selectOneMenu styleClass="large"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.secilenTercihSebebi}">
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.tercihSebepList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectOneMenu>
                          
                          
                          
                          
                          
                           </s:decorate>
                           <h:panelGrid columns="5" columnClasses="cell,cell">
                           <s:fragment>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.musteriAdresBilgileri']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusAdresBilgileriPopup')" />
                           </s:decorate>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.tuzelKisilikBilgileri']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusTuzelKisilikBilgileriPopup')" />
                          
                          
                           </s:decorate>
                           <br />
                           </s:fragment>
                           <s:fragment>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.dagitimKanalinaOzelBilgiler']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusAcenteyeOzelBilgilerPopup')" />
                          
                          
                           </s:decorate>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton" disabled="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriGiris}"
                           value="#{messages['musteri.button.portfoyBilgileri']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.primOdemeSorgula()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusPrimOdemeBilgileriPopup')" />
                           </s:decorate>
                           <br />
                           </s:fragment>
                           <s:fragment>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.iliskiliMusteriKurumBilgileri']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.showIliskiliMusteriBilgileri()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusIliskiliMusteriBilgileriPopup')" />
                          
                          
                           </s:decorate>
                           <s:decorate>
                          
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.ozelBilgiler']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusOzelBilgilerPopup')" />
                          
                          
                           </s:decorate>
                           <br />
                           </s:fragment>
                           <s:fragment>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton" disabled="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriGiris}"
                           value="#{messages['musteri.button.caprazSatisBilgileri']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusCaprazSatisBilgileriPopup')" />
                          
                          
                           </s:decorate>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.policePostaAdresleri']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusPolicePostaBilgileriPopup')" />
                          
                          
                          
                           </s:decorate>
                           <br />
                           </s:fragment>
                           <s:fragment>
                           <s:decorate>
                           <h:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.rizikoAdresleri']}"
                           disabled="true" />
                           </s:decorate>
                           <s:decorate>
                          
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.musteriHesapBilgileri']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusBankaHesapBilgileriPopup')" />
                          
                          
                          
                           </s:decorate>
                           <s:decorate>
                           <a:commandButton styleClass="uzunButton"
                           value="#{messages['musteri.button.kaskoFazlaAracTaahhut']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusKaskoFazlaAracTaahhutPopup')" />
                          
                          
                           </s:decorate>
                           </s:fragment>
                           </h:panelGrid>
                           <br />
                           <br />
                           <br />
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText value="#{messages['musteri.etiket.iletisimEposta']}" />
                           </ui:define>
                           <h:inputText
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.epostaModel.EPostaUser}"
                           styleClass="medium" />
                           <h:outputText value="@" />
                           <h:inputText
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.epostaModel.EPostaDomain}"
                           styleClass="medium" />
                           <a:commandButton styleClass="kucukButton"
                           value="#{messages['musteri.button.digerEposta']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusMailListesiPopup')" />
                          
                          
                           </s:decorate>
                           <h:panelGrid columns="2">
                           <s:fragment>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText
                           value="#{messages['musteri.etiket.iletisimTelefonTipi']}" />
                           </ui:define>
                          
                          
                          
                          
                           <h:selectOneMenu styleClass="medium"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.telefonModel.telefonTipi}">
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.telefonTipiList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectOneMenu>
                          
                          
                          
                          
                          
                           </s:decorate>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText
                           value="#{messages['musteri.etiket.iletisimTelefonNo']}" />
                           </ui:define>
                          
                          
                          
                          
                           <h:selectOneMenu styleClass="xsmall"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.telefonModel.alanKodu}">
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.alanKoduList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectOneMenu>
                          
                          
                           <a:commandButton styleClass="kucukButton"
                           value="#{messages['musteri.button.digerTelefon']}"
                           ajaxSingle="true"
                           action="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.adresBilgileriPopupMethod()}"
                           oncomplete="javascript:Richfaces.showModalPanel('rgMusMusTelefonListesiPopup')" />
                           </s:decorate>
                           <br />
                           <br />
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText value="#{messages['musteri.etiket.aramaSaati']}" />
                           </ui:define>
                          
                          
                           <h:selectOneMenu styleClass="medium"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.secilenAranmaSaati}">
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.aranmaSaatiList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectOneMenu>
                          
                          
                          
                           </s:decorate>
                           </s:fragment>
                           <s:fragment>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText
                           value="#{messages['musteri.etiket.faaliyetÖlcegi']}" />
                           </ui:define>
                          
                          
                          
                           <h:selectOneMenu styleClass="xlarge"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.musteriModel.faaliyetOlcegiKodu}">
                          
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.faaliyetOlcegiList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                          
                          
                           </h:selectOneMenu>
                          
                          
                          
                           </s:decorate>
                          
                          
                           <s:decorate
                           template="/module/musteri/region/rgMusMusFaaliyetGosterdigiSektor.xhtml" >
                           <ui:param name="templateHome"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome}" />
                           </s:decorate>
                          
                          
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText
                           value="#{messages['musteri.etiket.sabitVarlikBilgisi']}" />
                           </ui:define>
                          
                          
                          
                          
                           <h:selectOneMenu styleClass="xlarge"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.secilenSabitVarlikAraligi}">
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.sabitVarlikAraligiList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectOneMenu>
                          
                          
                          
                          
                          
                           </s:decorate>
                           <s:decorate template="/layout/editNew.xhtml">
                           <ui:define name="label">
                           <h:outputText value="#{messages['musteri.etiket.ciroBilgisi']}" />
                           </ui:define>
                          
                          
                           <h:selectOneMenu styleClass="xlarge"
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.secilenCiroAraligi}">
                           <f:selectItems
                           value="#{musMusTcdeYerlesikOlmayanTuzelKisiHome.ciroAraligiList}" />
                           <a:support event="onchange" ajaxSingle="true" />
                           </h:selectOneMenu>
                           </s:decorate>
                           </s:fragment>
                          
                          
                          
                           </h:panelGrid>
                           </r:panel>
                           </h:form>
                          
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusAdresBilgileriPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusTuzelKisilikBilgileriPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusAcenteyeOzelBilgilerPopup.xhtml" />
                          
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusIliskiliMusteriBilgileriPopup.xhtml" />
                          
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusCaprazSatisBilgileriPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusPrimOdemeBilgileriPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusOzelBilgilerPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusPolicePostaBilgileriPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusBankaHesapBilgileriPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusMailListesiPopup.xhtml" />
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusTelefonListesiPopup.xhtml" />
                          
                           <a:include
                           viewId="/module/musteri/popup/rgMusMusKaskoFazlaAracTaahhutPopup.xhtml" />
                          
                          
                           </ui:define>
                          </ui:composition>

                          ModalPanel is declare at here
                          called with javascript:Richfaces.showModalPanel('rgMusMusIliskiliMusteriBilgileriPopup')
                          and included with
                          <a:include
                          viewId="/module/musteri/popup/rgMusMusIliskiliMusteriBilgileriPopup.xhtml" />

                          • 10. Re: Rich modalpanel closes automatically
                            Ilya Shaikovsky Master

                            so ajaxRendered=false should be in this include. which includes modal. And b.t.w. again - it's a workaround. In 3.3.0 version will works without this attribute definition.

                            • 11. Re: Rich modalpanel closes automatically
                              Onur Kocer Newbie

                              thank you my friend
                              it works

                              • 12. Re: Rich modalpanel closes automatically
                                Onur Kocer Newbie

                                so my problem is solved by ajaxrenderer in a:includes
                                but what if i used ui:include ?
                                there is no option to use ajaxrenderer in ui:include
                                so my problem is continue in pages that i included them with ui
                                for example:

                                <ui:include src="/module/musteri/popup/rgMusMusKurumTablosuPopup.xhtml">
                                 <ui:param name="parentHome" value="#{rgMusMusMusteriYerlesikOlmayanTuzelKisiHome}">
                                 <s:convertEntity />
                                 </ui:param>
                                 <ui:param name="panelId" value="rgMusMusKurumTablosuPopup" />
                                 </ui:include>
                                [list=]


                                • 13. Re: Rich modalpanel closes automatically
                                  Ilya Shaikovsky Master

                                  No. In ui include should be no such problem. You could check in a4j:log what has been reRendered during ajax request. Area with modal panel seems goes to ajax update areas but this should not happens.

                                  • 14. Re: Rich modalpanel closes automatically
                                    Roman Podlesny Newbie

                                    Hello.
                                    I have almost the same problem.
                                    I want to use the modalPanel for CRUD operations. Start with create.
                                    The problems are:
                                    1. If I add anywhere <a4j:poll> tag, modal panel is closed after first time is carried out.
                                    2. Have the button <a:commandButton> on UserRoleEdit.xhtml id=saveNewRole. This button persist new user role in the DB. But than, modal panel has been closed automatically.
                                    3. On the other hand, it is not bad, if the modal panel is closed auto, but I want to refresh my list with the user roles. But new role is displayed after the manual refresh.

                                    RichFaces 3.2.2 GA

                                    Here is the code:

                                    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                                     xmlns:s="http://jboss.com/products/seam/taglib"
                                     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"
                                     template="../layout/template2.xhtml">
                                     <ui:define name="body">
                                     <a4j:log level="ALL" popup="false" width="400" height="200"></a4j:log>
                                     <rich:panel bodyClass="topper">
                                     <h:panelGrid columns="2">
                                     <rich:panelMenu style="width:200px;" mode="ajax"
                                     iconExpandedGroup="disc" iconGroupTopPosition="right"
                                     iconCollapsedGroup="disc" iconExpandedTopGroup="chevronUp"
                                     iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right"
                                     expandSingle="true" binding="#{PanelMenuBean.panelMenu}"/>
                                     <rich:panel>
                                     <a4j:outputPanel ajaxRendered="true" id="pageToRender">
                                     <ui:include src="#{menupage.jpage}" />
                                     </a4j:outputPanel>
                                     </rich:panel>
                                     </h:panelGrid>
                                     </rich:panel>
                                     </ui:define>
                                    </ui:composition>
                                    


                                    main.xhtml - main container for all pages in <ui:include> the UserRoleList.xhtml:

                                    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                                     xmlns:s="http://jboss.com/products/seam/taglib"
                                     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">
                                    <a4j:outputPanel ajaxRendered="true" id="userRoleMainPanel">
                                     <h:form id="userRoleSearch" styleClass="edit">
                                     <rich:simpleTogglePanel label="#{messages['module.roles.search']}" switchType="ajax" opened="false">
                                     <s:decorate template="layout/display.xhtml">
                                     <h:outputText value="#{messages['module.role.rolename']}" />
                                     <h:inputText id="roleName" value="#{userRoleList.userRole.roleName}"/>
                                     </s:decorate>
                                     <div class="actionButtons">
                                     <a4j:commandButton reRender="pageToRender" value="#{messages['common.button.search']}"/>
                                     <s:button id="reset" value="#{messages['common.button.reset']}">
                                     <f:param name="roleName"/>
                                     </s:button>
                                     </div>
                                     </rich:simpleTogglePanel>
                                     </h:form>
                                     <rich:panel>
                                     <f:facet name="header">
                                     <h:outputText value="#{messages['module.role.rolelist']}" />
                                     </f:facet>
                                     <div class="results" id="userRoleList">
                                     <h:outputText value="#{messages['common.label.notfound']}"
                                     rendered="#{empty userRoleList.resultList}"/>
                                     <a4j:form>
                                     <a4j:jsFunction id="myJSFunction" name="refreshTable" reRender="userRoleMainPanel" oncomplete="alert('updated');"></a4j:jsFunction>
                                     </a4j:form>
                                     <rich:dataTable id="userRoleList"
                                     var="_userRole"
                                     value="#{userRoleList.resultList}"
                                     rendered="#{not empty userRoleList.resultList}">
                                     <h:column>
                                     <f:facet name="header">
                                     <ui:include src="layout/sort.xhtml">
                                     <ui:param name="entityList" value="#{userRoleList}"/>
                                     <ui:param name="propertyLabel" value="#{messages['module.role.rolenumber']}"/>
                                     <ui:param name="propertyPath" value="userRole.roleId"/>
                                     </ui:include>
                                     </f:facet>
                                     <h:outputText value="#{_userRole.roleId}"/>
                                     </h:column>
                                     <h:column>
                                     <f:facet name="header">
                                     <ui:include src="layout/sort.xhtml">
                                     <ui:param name="entityList" value="#{userRoleList}"/>
                                     <ui:param name="propertyLabel" value="#{messages['module.role.rolename']}"/>
                                     <ui:param name="propertyPath" value="userRole.roleName"/>
                                     </ui:include>
                                     </f:facet>
                                     <h:outputText value="#{_userRole.roleName}"/>
                                     </h:column>
                                     <rich:column styleClass="action">
                                     <f:facet name="header">
                                     <h:outputText value="#{messages['common.lable.action']}" />
                                     </f:facet>
                                     <s:link view="/#{empty from ? 'UserRole' : from}.xhtml"
                                     value="#{empty from ? messages['common.button.view'] : messages['common.button.select']}"
                                     propagation="#{empty from ? 'none' : 'default'}"
                                     id="userRole"
                                     target="_blank">
                                     <f:param name="userRoleRoleId"
                                     value="#{_userRole.roleId}"/>
                                     </s:link>
                                     #{' '}
                                     <s:link view="/UserRoleEdit.xhtml"
                                     value="#{messages['common.button.edit']}"
                                     propagation="none"
                                     id="userRoleEdit"
                                     rendered="#{empty from}"
                                     target="_blank">
                                     <f:param name="userRoleRoleId"
                                     value="#{_userRole.roleId}"/>
                                     </s:link>
                                     </rich:column>
                                     </rich:dataTable>
                                     </div>
                                     </rich:panel>
                                     <div class="tableControl">
                                     <s:link view="/UserRoleList.xhtml"
                                     rendered="#{userRoleList.previousExists}"
                                     value="#{messages.left}#{messages.left}"
                                     id="firstPage">
                                     <f:param name="firstResult" value="0"/>
                                     </s:link>
                                     <s:link view="/UserRoleList.xhtml"
                                     rendered="#{userRoleList.previousExists}"
                                     value="#{messages.left}"
                                     id="previousPage">
                                     <f:param name="firstResult"
                                     value="#{userRoleList.previousFirstResult}"/>
                                     </s:link>
                                     <s:link view="/UserRoleList.xhtml"
                                     rendered="#{userRoleList.nextExists}"
                                     value="Next Page #{messages.right}"
                                     id="nextPage">
                                     <f:param name="firstResult"
                                     value="#{userRoleList.nextFirstResult}"/>
                                     </s:link>
                                     <s:link view="/UserRoleList.xhtml"
                                     rendered="#{userRoleList.nextExists}"
                                     value="Last Page #{messages.right}#{messages.right}"
                                     id="lastPage">
                                     <f:param name="firstResult"
                                     value="#{userRoleList.lastFirstResult}"/>
                                     </s:link>
                                     </div>
                                     <rich:modalPanel id="panelCreate" width="640" height="180">
                                     <a4j:support event="onhide" reRender="userRoleMainPanel" />
                                     <f:facet name="header">
                                     <h:panelGroup>
                                     <h:outputText value="#{messages['module.role.create.panel.label']}" />
                                     </h:panelGroup>
                                     </f:facet>
                                     <f:facet name="controls">
                                     <h:panelGroup>
                                     <h:graphicImage value="/img/close.png" style="cursor:pointer" id="hidelinkCreate"/>
                                     <rich:componentControl for="panelCreate" attachTo="hidelinkCreate" operation="hide" event="onclick"/>
                                     </h:panelGroup>
                                     </f:facet>
                                     <ui:include src="/UserRoleEdit.xhtml" />
                                     </rich:modalPanel>
                                     <s:div styleClass="actionButtons" rendered="#{empty from}">
                                     <h:outputLink value="#" id="createR">
                                     <rich:componentControl for="panelCreate" attachTo="createR" operation="show" event="onclick"/>
                                     <h:outputText value="#{messages['common.button.create']}" />
                                     <f:param name="userRoleRoleId"/>
                                     </h:outputLink>
                                     </s:div>
                                    </a4j:outputPanel>
                                    </ui:composition>
                                    


                                    it contains modalPanel. Content of modalPanel is <ui:include> too

                                    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                                     xmlns:s="http://jboss.com/products/seam/taglib"
                                     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:a="http://richfaces.org/a4j"
                                     xmlns:rich="http://richfaces.org/rich">
                                     <a:form>
                                     <rich:panel>
                                     <s:decorate id="conditionalField" template="layout/edit.xhtml">
                                     <ui:define name="label"><h:outputText value="#{messages['module.role.conditional.label']}" /></ui:define>
                                     <h:selectBooleanCheckbox id="conditional"
                                     value="#{userRoleHome.instance.conditional}" />
                                     </s:decorate>
                                     <s:decorate id="roleNameField" template="layout/edit.xhtml">
                                     <ui:define name="label"><h:outputText value="#{messages['module.role.rolename']}"/></ui:define>
                                     <h:inputTextarea id="roleName" cols="40" rows="1" required="true"
                                     value="#{userRoleHome.instance.roleName}" />
                                     </s:decorate>
                                     <div style="clear: both">
                                     <span class="required"><h:outputText value="#{messages['common.label.required']}"/></span>#{' '}
                                     <h:outputText value="#{messages['common.label.required.text']}" />
                                     </div>
                                     </rich:panel>
                                    
                                     <div class="actionButtons">
                                     <a:commandButton id="saveNewRole" value="#{messages['common.button.save']}"
                                     action="#{userRoleHome.persist}" disabled="#{!userRoleHome.wired}"
                                     rendered="#{!userRoleHome.managed}" onclick="alert('alert');refreshTable();"/>
                                     <h:commandButton id="save"
                                     value="#{messages['common.button.save']}" action="#{userRoleHome.persist}"
                                     disabled="#{!userRoleHome.wired}" rendered="#{!userRoleHome.managed}" />
                                     <h:commandButton id="update" value="#{messages['common.button.save']}"
                                     action="#{userRoleHome.update}" rendered="#{userRoleHome.managed}" />
                                     <h:commandButton id="delete" value="#{messages['common.button.delete']}"
                                     action="#{userRoleHome.remove}" immediate="true"
                                     rendered="#{userRoleHome.managed}" />
                                     <s:button id="done" value="#{messages['common.button.ok']}"
                                     propagation="end" view="/UserRole.xhtml"
                                     rendered="#{userRoleHome.managed}" />
                                     <s:button id="cancel" value="#{messages['common.button.cancel']}" propagation="end"
                                     view="/#{empty userRoleFrom ? 'UserRoleList' : userRoleFrom}.xhtml"
                                     rendered="#{!userRoleHome.managed}" />
                                     </div>
                                     </a:form>
                                    </ui:composition>
                                    
                                    


                                    1 2 Previous Next