6 Replies Latest reply on Jul 8, 2010 7:47 AM by jasper floor

    no ajax request generated

    jasper floor Newbie

      Hi all,


      I am trying to get rich:progressbar to work. Near as I can tell there are no AJAX requests generated. While I haven't exactly read the JS which is sent to the browser I'm fairly sure the JS is there. So that may suggest a clash with other js. I am not seeing any errors. I just see nothign happening. There is something happening since if I refresh the page the progressbar is actually showing progress.


      making an example would be fairly difficult as there are too many custom things going on. Obviously I have looked at those but I can't say whether they are intefering or not.


      (We actually do have a custom progressbar but that component seems to switch values it shouldn't in the backing beans. It was decided that it made more sense to use a component form a stable library rather than maintain our own.)

        • 1. Re: no ajax request generated
          Nick Belaevski Master



          First of all, is your rich:progressBar placed in form and set to use AJAX mode via attributes?


          Second, please add a4j:log to the page and check what's going on there.

          • 2. Re: no ajax request generated
            jasper floor Newbie

            The progress bar is in the form. Ajax mode should be default but I have tried to set it explicitly to ajax. Also I have explicitly set enabled to true.

            a4j:log gives no output.


            this is a simplified version of the form:


            <jsp:root version="2.0"
                <jsp:directive.page contentType="text/html;charset=UTF-8"/>
                <h:form >
                    <rich:panel style="border-style: none;padding: 0px;" styleClass="actionbox">
                        <h:panelGrid columns="3" rendered="#{!actionRequestController.hideActionBar}">
                            <h:outputText value="#{actionRequestController.jobName}" rendered="#{actionRequestController.jobRenderProgressBar}"/>
                            <pb:progressBar interval="1400" value="#{actionRequestController.jobPercentage}" rendered="#{actionRequestController.jobRenderProgressBar}" />
                            <h:commandButton value="stop" id="job" actionListener="#{actionRequestController.stopJobAction}" rendered="#{actionRequestController.jobRenderProgressBar}"/>


            but this is included in other files. It never gets called directly.

            • 3. Re: no ajax request generated
              Nick Belaevski Master

              I see that there's no pb:* prefix declared on the page.

              • 4. Re: no ajax request generated
                jasper floor Newbie

                oops, sorry. Ignore the pb tag, that's our own component we want to replace. It should be rich:progressbar. I was running both components next to each other and in trying to anonymize and simplify it I made a mistake.

                • 5. Re: no ajax request generated
                  jasper floor Newbie

                  Btw, we also use jsf 1.2

                  • 6. Re: no ajax request generated
                    jasper floor Newbie

                    I made a test project to see if I could get progressbar working at all. I've include the file but basically:


                             <a4j:log id="lolo"/>
                                <a4j:outputPanel id="asdf">
                                <h:outputText value="This is a text"></h:outputText>
                                    <rich:progressBar id="pb3" mode="ajax" minValue="0" maxValue="100" label="#{test.progress}" value="#{test.progress}" enabled="true" reRenderAfterComplete="asdf" rendered="true"></rich:progressBar>


                    If you remove the outputText nothing happens whatsoever.


                    with the outputText there are ajax request generated but nothing is happening.


                    firebug console says:

                    $(this.id) is null
                    onbeforedomupdate(Object { name="id"}, Object { name="containerId"}, Object { name="formId"}, Object { name="mode"}, Object { name="minValue"}, Object { name="maxValue"}, Object { name="context"}, Object { name="markup"}, Object { name="options"}, Object { name="progressVar"}, Object { name="state"}, Object { name="value"})progre....js.jsf (line 3)
                    klass()3_3_1....ipt.jsf (line 4)
                    test.jsf()test.jsf (line 5)
                    [Break on this error] this.mode=mode;this.state=state;this.m...'){parentForm=parentForm.parentNode;}


                    am also including a4j:log ouptut