Many times developers complain that actionListener of a button is not invocked when they add a showPopupBehavior. Yet that is not a bug.
By default showPopupBehavior the action type is Action that is a client event and does not invoke server actions. That is described in af:showPopupBehavior documentation:
The af:showPopupBehavior tag is a declarative way to show a af:popup in response to a client-side event. The client event is specified using the triggerType attribute. The "action" event is the default triggerType if one is not provided.
....
All actionListener method bindings and associated action listeners will not be invoked when the triggerType of "action" is used.
So the solution is to just set the triggerType of ShowPopupBehavior to click.

Then the actionListener and popup are invoked.

Edit 19/12/12:
As posted in the comments bellow, this is not the best possible workaround. It is more like a quick and dirty solution. With this solution even if the button is disabled the popup is still opened without the Action listener invoked.
A better solution if you need an action listener on buttons that opens a popup is not to use the showPopupBehavior but to open the popup from within the action listener by binding the popup to the managed bean and use popup.show() method.
By default showPopupBehavior the action type is Action that is a client event and does not invoke server actions. That is described in af:showPopupBehavior documentation:
The af:showPopupBehavior tag is a declarative way to show a af:popup in response to a client-side event. The client event is specified using the triggerType attribute. The "action" event is the default triggerType if one is not provided.
....
All actionListener method bindings and associated action listeners will not be invoked when the triggerType of "action" is used.
So the solution is to just set the triggerType of ShowPopupBehavior to click.

Then the actionListener and popup are invoked.

Edit 19/12/12:
As posted in the comments bellow, this is not the best possible workaround. It is more like a quick and dirty solution. With this solution even if the button is disabled the popup is still opened without the Action listener invoked.
A better solution if you need an action listener on buttons that opens a popup is not to use the showPopupBehavior but to open the popup from within the action listener by binding the popup to the managed bean and use popup.show() method.


