3 Replies Latest reply on May 6, 2010 8:59 AM by jgreene

    Can seam component property be set with a4j:actionparam before a4j:status is invoked?

    jgreene

      Hello -

      We use the a4j:status component extensively throughout our application in conjunction with the "status" attribute on command buttons.  The "onstart" property in the a4j:status component is used to show a rich:modalPanel component where we show a "Loading..." message and an image to indicate that we are waiting.  "Loading..." in the panel's header is hard-coded.  We would like to make this label dynamic based on where this status widget is called from.  For example, if we click a button to begin loading some file, we would want to display this modal with the label reading "Loading Files..." maybe, and if the modal is invoked when a button is clicked to, say, delete a user, we would like the label on the modal to read "Deleting user...", etc.

       

      We thought the natural solution to this would be to use an a4j:actionparam inside the a4j:commandButton component that invokes the action, and use the param to set the label in a ProgressBar seam component.  But apparently the status widget is invoked immediately since, of course, it is part of the ajax action, and the param value assignment has not yet taken place.

       

      Has anyone done this before?  Maybe we are making a simple mistake or a bad assumption and just need a nudge in the right direction.

       

      Any help would be appreciated.  Thank you.

       

      Message was edited by: Joe Greene Sorry, Question was very misleading - I rephrased it.