4 Replies Latest reply on May 15, 2008 1:52 PM by ronanker

    a4j:region and a4j:status

    ronanker

      As I know, each 'region' can have its own 'status' defined in it and any ajax component inside the region will use only the region's status unless using 'status' attribute.

      In my application I use a global status to something during ajax requests so each time i use a region i have to redefine it (duplication of code) or to use 'status' attibute on each component inside the region...

      It would be a lot easier and developper-friendly if we could have the 'status' attribute on the 'region' tag.

      actual :

      <view>
       <component/>
       <region>
       <component status="status"/>
       <component status="status"/>
       </region>
       <region>
       <status onstart="startAjax()" onstop="stopAjax()"/>
       <component/>
       <component/>
       </region>
       <status id="status" onstart="startAjax()" onstop="stopAjax()"/>
      </view>
      after:
      <view>
       <component/>
       <region status="status">
       <component/>
       <component/>
       </region>
       <region status="status">
       <component/>
       <component/>
       </region>
       <status id="status" onstart="startAjax()" onstop="stopAjax()"/>
      </view>


        • 1. Re: a4j:region and a4j:status
          ilya_shaikovsky

          [/url]http://jira.jboss.com/jira/browse/RF-578[/url] was requested already just comment or vote.

          • 2. Re: a4j:region and a4j:status
            ilya_shaikovsky
            • 3. Re: a4j:region and a4j:status
              ronanker

              thanks for your reply !

              this is not the same request but for nearly the same need.
              if you solve the issue RF-578, it won't solve my need.

              personally i don't consider that as a bug/issue, it's more a feature-request/evolution.

              being able to put multiple id in the for attibute can be useful for other case.

              in my case it's adding a 'status' attribute on the region tag. because the status tag is automatically inserted in each page at the end and it don't knows how many regions the page contains nor their ids.
              Also I would make some specific region that won't use the general status.

              in some very specific case where we would have multiples status for a region, i think the developper must avoid it and review his code, an error message should occur (like it's already the case but it says duplicateComponentId).

              As i don't know how it's implemented, i can't judge the difficulty of the evolution, maybe later i'll have a look on this.

              To be more precise, in my case the most important is the 'onstop' of my status that enables me to execute a javascript function at each end of ajax requests (after the oncomplete when there is one).
              If it's possible to do this without using status component, i would like to know how...

              • 4. Re: a4j:region and a4j:status
                ronanker

                not the same request, not exactly the same need... but it can be the same bug that prevent from doing it, i'm ok on this point.

                we could also add a boolean attribute on the status to make it valid for the whole page and not only current region... this is a more common need to please lot of people :-)