PhotoAlbum Application Download Support Developer Guide
Skins:
Resources/Beans Handling
Ajax Miscellaneous
Usage
Tag Information

a4j:status is an indicator of an Ajax request. It has two states - start and stop. The start state indicates that an Ajax request is in progress. When Ajax Response comes back, the component switches to the stop stage.

Status Demo
Ajax Status:Complete



View Source

startText attribute defines the label that will be visible when the Ajax request is in progress. You can use startStyle or startStyleClass attribute to customize style for a start label. You can use facet name="start" to define more enhanced content for indication of the start state. If facet is defined, the value of startText attribute becomes void.

stopText attribute defines the label that will be visible when the Ajax Response comes back. You can use stopStyle or stopStyleClass attribute to customize style for a stop label. You can use facet name="stop" to define more enhanced content for indication of the stop state. If facet is defined, the value of stopText attribute becomes void.

In case of not stopText nor facet name="stop" are not defined, the stop stage will not have a visual representation. You can use this option if you want to show only "in progress" indicator. The following example show the graphic image to the right of the input field during an Ajax request.

Status Demo



View Source

By default, a4j:status works for each Ajax components inside the local region. This means if you have not any region defined on the page (the whole view is a region) and have only one a4j:status on the page, this a4j:status will be activated during Ajax request sent by any of the Ajax component located on the page.

This client id of the a4j:status component is assigned based on the following pattern: <working region Id>:status . for attribute defines the id of the region the a4j:status will work for. If 'for' attribute is not defined, the working region will be the region, the a4j:status located into. The root region has a "_viewRoot" name.

forceId attribute allows to replace the ":status" postfix of the client id with the defined 'id' attribute. If 'forceId' attribute is not defined, the defined 'id' attribute will be ignored.

It is possible to have more than one a4j:status on the same page. In this case, you need to wire status components with the Ajax component used for Ajax requests producing.

You do not have any additional attribute defined if you have a4j:status inside each region and working for this given region. You can locate the a4j:status outside of the region if this is required by a page layout. In this case you have to define a 'for' attribute explicitly. The 'for' attribute should point to the id of the region it should work for.

Use attribute 'status' of the Ajax component (such as a4j:commandButton, a4j:poll, etc.) should point to the id of the a4j:status if you want to share it between the different Ajax component located in different regions. The following example shows how to share the same a4j:status from the Ajax component located in the different region:

Status Demo
Status:
Name
Job

Name: , Job:




View Source
RichFaces Wiki RichFaces Project Site