Proper Use of ActionStatus component

In preparation for the Advanced Developer exam, I have been painstakingly going page by page through the Visualforce Developers Guide (which can be found online here). Almost every single person that has passed the exam has suggested that you become intimate with this document, but I wonder how many people truly are. I keep finding that the code listed in the tutorials does not work as it should. My last post was about one such error and now I have another big one.

On page 44 of the guide, they provide an example of using the ActionStatus component to provide a status for Ajax operations. Great! It is an awesome tool, but unfortunately, the code example they provide on that page does not work. If you copy the code from this tutorial and use it in a page and then try to see the text, you will not see it.

You can however, make two simple code changes to the code they provide and it will work as promised. But, only if you do this, will it work. So, the code that does work is seen below. What the tutorial authors missed was that an id attribute is needed for the ActionStatus component and that id value must be referenced in the status attribute of another component on the page.

ActionStatusProblemCode

Hope this helps someone else from not being confused about how ActionStatus is supposed to work. At first, I thought I was just not seeing it quickly enough (silly me…)

3 thoughts on “Proper Use of ActionStatus component

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s