1 2 Previous Next 16 Replies Latest reply on Feb 4, 2009 8:11 AM by ramki9977

    Progress bar problem while sending ajax request

      hi,
      in my application i have a main page where i can click a button which launch the popup(modal panel). inside that modal panel i have some fields to select from data table and have a submit button(a4j:commandButton inside modal panel). i am showing one progress(again one modal panel which will show progress bar) bar when user clicks on that button and i am hiding that modal panel(progress bar) oncomplete event of a4j:commandbutton. its working fine in ie6(when ever i click on that submit button its showing progress bar(modal panel) and hiding modal panel oncomplete of response from server.

      upto now every thing goes well. but the problem is when i run my app in IE7 that progress is never hiding(page itself hanging). can any one help me please what exactly the problem is.

      thanks,
      ramki.

        • 1. Re: Progress bar problem while sending ajax request
          nbelaevski

          Ramki,

          What is RF version version? Are there any errors or warnings in a4j:log?

          • 2. Re: Progress bar problem while sending ajax request

            i am using RF 3.2.2 GA. i kept <a4j:log/> but it showed one time out of memory at line:xxx(i got only one time). overall there are no java script errors.

            thanks,
            ramki.

            • 3. Re: Progress bar problem while sending ajax request
              ilya_shaikovsky

              in order to avoid out of memory place the log outside the forms.

              • 4. Re: Progress bar problem while sending ajax request

                in IE i am getting this java script error. Richfaces undefined. and its displaying blank page. when i click on back button then its showing page.

                • 5. Re: Progress bar problem while sending ajax request
                  ilya_shaikovsky

                  ok.. seems that now we are talking about log usage problems :).. Lets return to your case.. Show please the pages snippets and provide environment details.

                  • 6. Re: Progress bar problem while sending ajax request

                    Parent Page:
                    ============
                    <f:subView>
                    <h:form>
                    ..........
                    <a4j:commandButton value="#{messages.btnAllPages_SaveAs}"
                    id="btnSaveAs" rendered="#{recipe.viewSaveAsMode}"
                    onclick="Richfaces.showModalPanel('newRecipeScreen')"
                    styleClass="button_style" disabled="#{recipe.viewOrEditMode}" />
                    <rich:spacer width="5" />
                    </h:form>
                    <rich:modalPanel id="newRecipeScreen" height="250" width="430">
                    <f:facet name="header">
                    <h:outputText id="newRecipeScreenLabel"
                    value="#{messages.labelRecipeInformation_newRecipeScreen}" />
                    </f:facet>
                    <f:facet name="controls">
                    <h:graphicImage value="../images/close.png" style="cursor:pointer"
                    id="image4" onclick="Richfaces.hideModalPanel('newRecipeScreen')" />
                    </f:facet>
                    <h:panelGrid id="modalPanelGrid">
                    <ui:include src="../Pages/RM_SaveAsRecipe.xhtml" />
                    </h:panelGrid>
                    </rich:modalPanel>
                    </f:subview>


                    page2(RM_SaveAsRecipe.xhtml code)
                    ==========================
                    <f:subview>
                    <h:form>
                    ..............
                    ..............
                    <a4j:commandButton id="btnOk" value="Ok"
                    styleClass="button_style"
                    nclick="Richfaces.showModalPanel('progressBar')"
                    action="#{recipe.saveAsNewRecipe}"
                    reRender="AlertSuccessForSaveAsRecipe"
                    oncomplete="Richfaces.hideModalPanel('progressBar');
                    Richfaces.showModalPanel('AlertSuccessForSaveAsRecipe')/>
                    </h:form>
                    <rich:modalPanel id="progressBar" width="170" height="25"
                    moveable="false" resizeable="false" autosized="true"
                    style="background- image:url('../images/progressBar.gif');">

                    </rich:modalPanel>
                    <rich:modalPanel id="AlertSuccessForSaveAsRecipe" height="160"
                    width="420">
                    <f:facet name="header">
                    <h:outputText value="#{messages.label_UserInfo}"/>
                    </f:facet>
                    <f:facet name="controls">
                    <h:graphicImage value="../images/close.png" style="cursor:pointer"
                    id="image8"
                    onclick="Richfaces.hideModalPanel('AlertSuccessForSaveAsRecipe')" />
                    </f:facet>
                    <h:panelGrid id="modalPanelGridForSaveRecipe">
                    <ui:include src="/Pages/RM_AlertSuccessForSaveAsRecipe.xhtml" />
                    </h:panelGrid>
                    </rich:modalPanel>
                    </f:subview>
                    =======================
                    Page 3(RM_AlertSuccessForSaveAsRecipe.xhtml)
                    ================================
                    <a4j:commandButton id="btnOk"
                    reRender="recipeInfoTabID,cookbooksAndCategoryID,recipeIngredientsTabID,recipePrepInstrTabID"
                    value="Ok" styleClass="button_style"
                    action="#{recipe.viewOrEditRecipe}"
                    onclick="Richfaces.showModalPanel('progressBar')"
                    oncomplete="Richfaces.hideModalPanel('progressBar');Richfaces.hideModalPanel('AlertSuccessForSaveAsRecipe')">
                    </a4j:commandButton>

                    =======================

                    my codes seems very lengthy. can you please Analyze my code and tell where actly i am doing mistake. its blocker issue in app. its not running in both ie7 firefox 3.0.5

                    my environment

                    JSF1.2
                    RF 3.2.2GA

                    thanks,
                    ramki


                    • 7. Re: Progress bar problem while sending ajax request
                      ilya_shaikovsky

                      also please show your actions.

                      • 8. Re: Progress bar problem while sending ajax request

                        following are my action methods

                        public void saveAsNewRecipe ( )
                        {
                        ...................

                        }

                        public String viewOrEditRecipe
                        {
                        ..............
                        ................
                        return RMConstants.CREATE_RECIPE;(navigation rule of parent page).
                        }

                        • 9. Re: Progress bar problem while sending ajax request
                          ilya_shaikovsky

                          thats the problem. Navigation you using could be < redirect /> only. It seems isn't good idea in general to use ajax controls (controls for partial page update) for navigation. We supports two cases:

                          1) as I mentioned redirect navigation cases.
                          2) navigation inside a4j:include.

                          • 10. Re: Progress bar problem while sending ajax request

                            i am not using redirect below is my code

                            <navigation-case>
                            <from-outcome>createRecipe</from-outcome>
                            <to-view-id>/Pages/RM_RecipeInformation.xhtml</to-view-id>
                            </navigation-case>

                            you mean to say do i need to remove return type from that method.


                            can you please explain a bit more for your answer.

                            thanks,
                            ramki.

                            • 11. Re: Progress bar problem while sending ajax request
                              ilya_shaikovsky

                               

                              i am not using redirect below is my code

                              but you have to.

                              Navigation could be only redirect based or within a4j:include.

                              check https://jira.jboss.org/jira/browse/RF-3745 and related. also we have many analogous cases at forum already.

                              • 12. Re: Progress bar problem while sending ajax request

                                but my bean is request scoped and i am using keepalive if i do redirect my bean is setting to null.

                                thanks,
                                ramki.

                                • 13. Re: Progress bar problem while sending ajax request
                                  ilya_shaikovsky

                                  Yes but without redirect navigation will not work(except the case of navigation inside a4j:include). Navigation isn't main case for page partial update controls. So this issue still open.

                                  • 14. Re: Progress bar problem while sending ajax request

                                    ok, if i include child pages in <a4j:include/> will it work.

                                    thanks,
                                    ramki.

                                    1 2 Previous Next