5 Replies Latest reply on Jan 9, 2009 2:32 PM by ilya_shaikovsky

    Problem After updated version Richfaces 3.2.0 ---> 3.2.2

    bala7

      Hi

      I updated my Richfaces 3.2.2.

      Problem is after update , the modal panel messages and where ever i kept a4j close button are not working properly.

      In Richfaces 3.2.0 , it works fine.

      I attached the code for ur reference.


      [color=444444]optincreate.xhtml

      <h:panelGroup id="formbuttongroup">
      <a4j:commandButton action="#{formmanager.createUpdateOptinForm}" value="Create Opt-in Form" rendered="#{formmanager.optinForm.id == 0}" reRender="optinfform, formcontent" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
      <a4j:commandButton action="#{formmanager.createUpdateOptinForm}" value="Update Opt-in Form" rendered="#{formmanager.optinForm.id gt 0}" reRender="optinfform, formcontent" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
      <f:verbatim>  </f:verbatim>
      [color=444444]<a4j:commandButton value="Close" action="#{formmanager.cancel}" ajaxSingle="true" reRender="formpanelgroup"/>
      <f:verbatim>  </f:verbatim>
      <a4j:status>
      <f:facet name="start">
      <h:graphicImage value="../images/processing.gif"/>
      </f:facet>
      </a4j:status>
      </h:panelGroup>




      [color=444444][color=blue]Index.xhtml


      <a4j:outputPanel id="formpanelgroup" ajaxRendered="true">
      <h:form>
      <a4j:include viewId="/forms/optinview.xhtml"/>
      </h:form>

      <a4j:form>
      <a4j:jsFunction name="closeModal" action="#{formmanager.closeModal}" ajaxSingle="true" reRender="optinlist" oncomplete="#{rich:component('delete')}.hide()"/>
      </a4j:form>

      <h:panelGroup rendered="#{action eq 'OPTIN'}">
      <h:form id="optincreate">
      <a4j:region>
      <a4j:include id="includeoptin" viewId="/forms/optincreate.xhtml"/>
      </a4j:region>
      </h:form>




      </h:panelGroup>

      <h:panelGroup rendered="#{action eq 'GLOBALOPTIN'}">
      <h:form id="globaloptincreate">
      <a4j:region>
      <a4j:include id="includeglobal" viewId="/forms/globaloptinform.xhtml"/>
      </a4j:region>
      </h:form>




      </h:panelGroup>

      <h:panelGroup rendered="#{action eq 'OPTOUT'}">

      <h:form id="optoutform">
      <a4j:region>

      <a4j:outputPanel style="float:right" >
      <h:graphicImage value="../images/ico_tooltip.gif" />
      <rich:toolTip direction="top-right" followMouse="true" showDelay="500" layout="block" styleClass="tooltip" value="#{tooltip['forms.optout']}"/>
      <f:verbatim> </f:verbatim>
      </a4j:outputPanel>
      <h3>Update Opt-out Form</h3>




      <h:outputLabel value="Opt Out Form Details" styleClass="headings" />


      <h:panelGrid columns="2" border="0">
      <h:outputLabel value="Confirmation Page : " styleClass="wizard"/><h:inputText value="#{formmanager.optoutForm.redirectUrl}" size="50"/>
      <h:outputLabel value="Global Unsubscribe: " styleClass="wizard"/><h:selectBooleanCheckbox value="#{formmanager.globalUnsub}"/>
      </h:panelGrid>

      <a4j:commandButton value="Update Form" action="#{formmanager.updateOptOutForm}" reRender="optinfform" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
      <f:verbatim>  </f:verbatim>
      <a4j:commandButton value="Cancel" action="#{formmanager.cancel}" reRender="formpanelgroup"/>






      </a4j:region>
      </h:form>

      </h:panelGroup>

      <h:panelGroup rendered="#{action eq 'FORWARD'}">

      <h:form id="forwardform">
      <a4j:region>

      <a4j:outputPanel style="float:right" >
      <h:graphicImage value="../images/ico_tooltip.gif" />
      <rich:toolTip direction="bottom-left" followMouse="true" showDelay="500" layout="block" styleClass="tooltip" value="#{tooltip['forms.forward']}"/>
      <f:verbatim> </f:verbatim>
      </a4j:outputPanel>
      <h3>Update Forward to a Friend Form</h3>




      <h:outputLabel value="Forward Form Details" styleClass="headings" />


      <h:panelGrid columns="2" border="0">
      <h:outputLabel value="Form Content: " styleClass="wizard"/>
      <h:inputTextarea id="formtext" value="#{formmanager.forwardForm.formContent}" cols="100" rows="10" />
      <h:outputLabel value="Initial Page : " styleClass="wizard"/><h:inputText value="#{formmanager.forwardForm.redirectUrl}" size="50"/>
      <h:outputLabel value="Final Page : " styleClass="wizard"/><h:inputText value="#{formmanager.forwardForm.finalUrl}" size="50"/>

      </h:panelGrid>

      <h:commandButton value="Preview" onmousedown="getFormContent()" onclick="preview_form()" />
      <f:verbatim>  </f:verbatim>
      <a4j:commandButton value="Update Form" action="#{formmanager.updateForwardForm}" reRender="optinfform" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
      <f:verbatim>  </f:verbatim>
      <a4j:commandButton value="Cancel" action="#{formmanager.cancel}" reRender="formpanelgroup"/>






      </a4j:region>
      </h:form>





      </h:panelGroup>
      </a4j:outputPanel>

      thanks
      Balaji

        • 1. Re: Problem After updated version Richfaces 3.2.0 ---> 3.2.2
          nbelaevski

          Hello Balaji,

          Can you please clarify what do you mean by saying "not working properly"? Looking at the code I suggest that you add

          ajaxRendered="false"
          to <a4j:include> components.

          Also can you please repost pages code, as it's got somewhat messy?

          • 2. Re: Problem After updated version Richfaces 3.2.0 ---> 3.2.2
            ilya_shaikovsky

            and also please check our of form elements usage with modal panel.

            • 3. Re: Problem After updated version Richfaces 3.2.0 ---> 3.2.2
              ilya_shaikovsky

              and b.t.w. next time wrap the snippets with [ code ] tags.

              • 4. Re: Problem After updated version Richfaces 3.2.0 ---> 3.2.2
                bala7

                Hi

                I mean after clicking a4j close button , Ajax wheel is keep on rotating for request. there is no response after clicking the close button.
                I face this problem in Richfaces 3.2.2 , not in previous version.


                Note: Is there is any rendering problem in a4j:region while using Richfaces 3.2.2 ?

                Here i attached the code for your reference:
                Index.xhtml

                <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="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:s="http://jboss.com/products/seam/taglib">


                <a4j:outputPanel id="formpanelgroup" ajaxRendered="true">
                <h:form>
                <a4j:include viewId="/forms/optinview.xhtml"/>
                </h:form>

                <a4j:form>
                <a4j:jsFunction name="closeModal" action="#{formmanager.closeModal}" ajaxSingle="true" reRender="optinlist" oncomplete="#{rich:component('delete')}.hide()"/>
                </a4j:form>

                <h:panelGroup rendered="#{action eq 'OPTIN'}">
                <h:form id="optincreate">
                <a4j:region>
                <a4j:include id="includeoptin" viewId="/forms/optincreate.xhtml"/>
                </a4j:region>
                </h:form>




                </h:panelGroup>

                <h:panelGroup rendered="#{action eq 'GLOBALOPTIN'}">
                <h:form id="globaloptincreate">
                <a4j:region>
                <a4j:include id="includeglobal" viewId="/forms/globaloptinform.xhtml"/>
                </a4j:region>
                </h:form>




                </h:panelGroup>

                <h:panelGroup rendered="#{action eq 'OPTOUT'}">

                <h:form id="optoutform">
                <a4j:region>

                <a4j:outputPanel style="float:right" >
                <h:graphicImage value="../images/ico_tooltip.gif" />
                <rich:toolTip direction="top-right" followMouse="true" showDelay="500" layout="block" styleClass="tooltip" value="#{tooltip['forms.optout']}"/>
                <f:verbatim>&amp;nbsp;</f:verbatim>
                </a4j:outputPanel>
                <h3>Update Opt-out Form</h3>




                <h:outputLabel value="Opt Out Form Details" styleClass="headings" />


                <h:panelGrid columns="2" border="0">
                <h:outputLabel value="Confirmation Page : " styleClass="wizard"/><h:inputText value="#{formmanager.optoutForm.redirectUrl}" size="50"/>
                <h:outputLabel value="Global Unsubscribe: " styleClass="wizard"/><h:selectBooleanCheckbox value="#{formmanager.globalUnsub}"/>
                </h:panelGrid>

                <a4j:commandButton value="Update Form" action="#{formmanager.updateOptOutForm}" reRender="optinfform" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
                <f:verbatim>&amp;nbsp;&amp;nbsp;</f:verbatim>
                <a4j:commandButton value="Cancel" action="#{formmanager.cancel}" reRender="formpanelgroup"/>






                </a4j:region>
                </h:form>

                </h:panelGroup>

                <h:panelGroup rendered="#{action eq 'FORWARD'}">

                <h:form id="forwardform">
                <a4j:region>

                <a4j:outputPanel style="float:right" >
                <h:graphicImage value="../images/ico_tooltip.gif" />
                <rich:toolTip direction="bottom-left" followMouse="true" showDelay="500" layout="block" styleClass="tooltip" value="#{tooltip['forms.forward']}"/>
                <f:verbatim>&amp;nbsp;</f:verbatim>
                </a4j:outputPanel>
                <h3>Update Forward to a Friend Form</h3>




                <h:outputLabel value="Forward Form Details" styleClass="headings" />


                <h:panelGrid columns="2" border="0">
                <h:outputLabel value="Form Content: " styleClass="wizard"/>
                <h:inputTextarea id="formtext" value="#{formmanager.forwardForm.formContent}" cols="100" rows="10" />
                <h:outputLabel value="Initial Page : " styleClass="wizard"/><h:inputText value="#{formmanager.forwardForm.redirectUrl}" size="50"/>
                <h:outputLabel value="Final Page : " styleClass="wizard"/><h:inputText value="#{formmanager.forwardForm.finalUrl}" size="50"/>

                </h:panelGrid>

                <h:commandButton value="Preview" onmousedown="getFormContent()" onclick="preview_form()" />
                <f:verbatim>&amp;nbsp;&amp;nbsp;</f:verbatim>
                <a4j:commandButton value="Update Form" action="#{formmanager.updateForwardForm}" reRender="optinfform" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
                <f:verbatim>&amp;nbsp;&amp;nbsp;</f:verbatim>
                <a4j:commandButton value="Cancel" action="#{formmanager.cancel}" reRender="formpanelgroup"/>






                </a4j:region>
                </h:form>





                </h:panelGroup>
                </a4j:outputPanel>




                optincreate.xhtml



                <div id="createoptindiv" class="column1" 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"
                xmlns:s="http://jboss.com/products/seam/taglib">

                /// optincreate page code

                // On click the below close button , request keep on loading ...

                <h:panelGroup id="formbuttongroup">
                <a4j:commandButton action="#{formmanager.createUpdateOptinForm}" value="Create Opt-in Form" rendered="#{formmanager.optinForm.id == 0}" reRender="optinfform, formcontent" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
                <a4j:commandButton action="#{formmanager.createUpdateOptinForm}" value="Update Opt-in Form" rendered="#{formmanager.optinForm.id gt 0}" reRender="optinfform, formcontent" limitToList="true" oncomplete="#{rich:component('messagepanel')}.show()"/>
                <f:verbatim>&amp;nbsp;&amp;nbsp;</f:verbatim>
                <a4j:commandButton value="Close" action="#{formmanager.cancel}" ajaxSingle="true" reRender="formpanelgroup"/>
                <f:verbatim>&amp;nbsp;&amp;nbsp;</f:verbatim>
                <a4j:status>
                <f:facet name="start">
                <h:graphicImage value="../images/processing.gif"/>
                </f:facet>
                </a4j:status>
                </h:panelGroup>





                thanks
                Balaji.

                • 5. Re: Problem After updated version Richfaces 3.2.0 ---> 3.2.2
                  ilya_shaikovsky

                  1) have you modified the code according to our latest suggestions?

                  2) please share the example anywhere in order to download and check them.