Details
Description
In our icefaces.jar, we have a faces-config.xml which stomps over the regular renderers for the standard h: components. This means that when you have an application with mixed ICEfaces and non-ICEfaces pages, there's limitations where you have to use just-ice.jar, and use ice: component in the ICEfaces pages and h: components in the non-ICEfaces pages. It probably also limits the ways we can go between the two types of pages.
What would be preferable is if we programmatically overrode these relationships, maintaining the defaults, so that depending on the context of the request, we could return either the stock renderers or the ICEfaces D2D renderers, all within the same application.
Technically, all of the encode and decode methods make use of UIComponentBase.getRenderer(FacesContext) to find the Renderer. It gets the RenderKit from the FacesContext, and asks it for the Renderer. We could employ several approaches:
A) Have our BridgeFacesContext return a different RenderKit, that would return the ICEfaces Renderers, leaving the regular FacesContext to return the regular RenderKit with the stock Renderers
B) Capture the stock renderers, and wrap them into proxy renderers, which will use the stock of ICEfaces ones appropriately
Care should be taken to make this work with ourICE-2309 efforts.
What would be preferable is if we programmatically overrode these relationships, maintaining the defaults, so that depending on the context of the request, we could return either the stock renderers or the ICEfaces D2D renderers, all within the same application.
Technically, all of the encode and decode methods make use of UIComponentBase.getRenderer(FacesContext) to find the Renderer. It gets the RenderKit from the FacesContext, and asks it for the Renderer. We could employ several approaches:
A) Have our BridgeFacesContext return a different RenderKit, that would return the ICEfaces Renderers, leaving the regular FacesContext to return the regular RenderKit with the stock Renderers
B) Capture the stock renderers, and wrap them into proxy renderers, which will use the stock of ICEfaces ones appropriately
Care should be taken to make this work with our
Issue Links
- blocks
-
ICE-3738 DesignTime does override default Renderer
- Closed
Given the functionality in ICE-3543, we should be able to just flip between RenderKits, when we're on different types of pages, using the ICEfacesRenderKit one for ICEfaces pages, and the HTML_BASIC for non-ICEfaces pages.
It might be as simple as modifying how we set the UIViewRoot's renderKitId, potentially by overriding ViewHandler.calculateRenderKitId(FacesContext).