3 Replies Latest reply on Nov 6, 2013 3:40 PM by bleathem

    Disable Push (RF4.2 a4j:push)

    alegem

      Hi,

       

      I'm searching for a way to disable the aj4:push component. I don't want to disable it in general but only for one client (e.g. if client deselects a checkbox).

       

      I tried to disable it by setting rendered=false but when I try to re-enable it might a take some time or doesn't work at all.

       

      Any suggestions to this?

       

      Cheers,

      alegem

        • 1. Re: Disable Push (RF4.2 a4j:push)
          bleathem

          If you put it in a conditionally rendered panelGroup are you more successful?

          • 2. Re: Disable Push (RF4.2 a4j:push)
            alegem

            Hi Brian,

             

            thats what a tried originally. Sometimes it's working after a couple of seconds, sometimes not.

             

            <h:panelGroup rendered="true">

                <h:selectBooleanCheckbox value="#{controller.pushEnabled}" >

                    <a4j:ajax event="click" render="pushPanel" />

                </h:selectBooleanCheckbox>

                <h:outputLabel value="Update page:" />

            </h:panelGroup>

             

            <h:panelGroup id="pushPanel">

                <a4j:push address="resPush" onerror="alert(event.rf.data)" rendered="#{controller.pushEnabled}">

                    <a4j:ajax event="dataavailable" render="table" />

                </a4j:push>

            </h:panelGroup>

             

            alegem

            • 3. Re: Disable Push (RF4.2 a4j:push)
              bleathem

              Any messages in your browser console or in your sever log?  See this post on debugging RichFaces:

              https://gist.github.com/lfryc/6123495