usage of setPropertyListener and setActionListener

Posted by Vijay Mohan on Oracle Blogs See other posts from Oracle Blogs or by Vijay Mohan
Published on Fri, 21 May 2010 19:03:57 +0000 Indexed on 2010/05/21 19:32 UTC
Read the original article Hit count: 276

Filed under:
The incorrect usage could lead to hard-to-debug problems so better to understand the fundamentals behind it's working.

setpropertyListener queues an event on the server side, so if for a command component you have a showPopup behavior/actionListner as well as setPropertyListener then fwk does the queuing correctly and raises further event on the component. While, the setactionListener simply raises an event on the server side instead of queueing it, so any further event on command component gets cancelled.

Also, if you use an ActionListener and showPopup behavior together on a command component, then the order of their invocation is undetermined and also one of event gets cancelled on the component. So, either use only actionListner and do the popup invocation stuff progrmmatically in your bean or use the declarative stuff logically so that no clash of event happens.

© Oracle Blogs or respective owner