Background: Because the base Faces implementation contains servlet dependencies
and/or is only implemented to support the servlet model the bridge ends up being
a replacement/alternative base when run in the portlet environment. The bridge
uses the various Faces extension points to plug itself in to override this base
behavior. In general its preferrable if the bridge's extensions were always at
the bottom of the stack, closest to the base. This can me somewhat accomplished
with the FacesContext/ExternalContext by defining the FacesContextFactory as a
service and asking all other Faces extensions to define their
FacesContextFactory in the face-config.xml. However there are numerous bridge
extensions that can only be defined in the faces-config.xml (ViewHandler,
StateManager, ELResolver). Some implementation in these extensions are
complicated by the bridge having to assume it may be prematurely called (i.e.
extensions would be called after it if it delegated) vs. delegation would be
inappropriate because those impls being covered are base/servlet dependent
impls. Its also a little weird to have part of the bridge inserted into the
Faces structure at a low level and the rest of it at a more random upper level.
Need: A way to control order that extensions are configured/executed in Faces.