0 Replies Latest reply on Oct 3, 2010 10:35 PM by Tanya Ruttenberg

    a4j:status and forceId not working as expected

    Tanya Ruttenberg Expert

      It's late and I'm tired and hopefully as soon as I post this the answer will leap out at me.

       

      I open a modalPanel with  this a4j:commandlink

       

      <a4j:commandLink ajaxSingle="true" id="editLink"
                  oncomplete="#{rich:component('confirmationPanel')}.show()"
                  rendered="#{canDelete}"
                  actionListener="#{devicesHome.loadDevice(_device.devId)}"
                  reRender="confirmationPanel" eventsQueue="ondQueue"/>

       

       

      The modalPanel asks the user to confirm an action.  Here is the code for the OK button located on the modalPanel

       

       

      <a4j:status id="waitstatus" forceId="true" startText="starting..." stopText="done" />

      <a4j:commandButton id="in1" value="OK" status="waitstatus"
                style="width: 75px;font-size: 14px"
                oncomplete="#{rich:component('confirmationPanel')}.hide();endit();return false"
                onclick="deletedevice();refreshlist()"
                eventsQueue="ondQueue" />

       

       

      The idea being that when the user clicks OK, the device gets deleted (deletedevice()), the listing gets refreshed (refreshlist()).  When that's all done the modalPanel is closed (.hide()) and the conversation ended (endit()).  It works just fine until I try and display a status.

       

      The status is only supposed to show during deletedevice() and refreshlist().  However, the stopText ("done") appears in the modalPanel as soon as it pops open. Moreover, the status does NOT show during execution of the actions defined in the commandButton.

       

      Any idea why this is not working as intended?  Note use of forceId and status attributes.

       

      TDR