I'm citing from this answer:
Whenever an UICommand
component fails to invoke the associated action, verify the following:
UICommand
components must be placed inside an UIForm
component (e.g. h:form
).
- You cannot nest multiple
UIForm
components in each other (watch out with include files!).
- No validation/conversion error should have been occurred (use
h:messages
to get them all).
- If
UICommand
components are placed inside an UIData
component, ensure that exactly the same DataModel
(the object behind the UIData
's value
attribute) is preserved.
- The
rendered
and disabled
attributes of the component and all of the parent components should not evaluate to false
during apply request values phase.
- Be sure that no
PhaseListener
or any EventListener
in the request-response chain has changed the JSF lifecycle to skip the invoke action phase.
- Be sure that no
Filter
or Servlet
in the same request-response chain has blocked the request fo the FacesServlet
somehow.
Another cause can be that you're not running the code you think you're running.