Chapter 6 of the FacesBridge Spec states the following requirements regarding ExternalContext.encodeActionURL(String):
Process the `inputURL` and construct and encode a corresponding valid portlet (generally action) URL. If called during
the `HEADER_PHASE`, `RENDER_PHASE`, or `RESOURCE_PHASE`, return this URL so it can be written into the markup response.
If called during the `ACTION_PHASE`, directly encode this URL in the action response. The value and form of the URL
returned when running in the `ACTION_PHASE` is undefined although it must not be `null`. If called during the
`EVENT_PHASE`, directly encode this URL in the event response. The value and form of the URL returned when running in
the `EVENT_PHASE` is undefined although it must not be `null`.
The requirement to directly encode the URL in the action/event response is an implementation detail of the MyFaces Portlet Bridge. The use-case that this requirement is trying to solve is in the context of executing navigation with a portletMode and/or windowState change. Liferay Faces Bridge performs the encoding in BridgeNavigationUtil.java.
This issue serves as a task for removing the implementation detail from the Spec language and clarifying the return value in the ACTION_PHASE and EVENT_PHASE of the portlet lifecycle.