-
Type:
New Feature
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: facesbridge-api-5.0.0, facesbridge-spec-5.0.0
-
Component/s: FacesBridge API, FacesBridge Spec
-
Labels:None
This task includes adding a new javax.portlet.faces.BridgeFactoryFinder class modeled after the javax.faces.FactoryFinder feature in the JSF API. However, unlike the JSF FactoryFinder, the BridgeFactoryFinder should take advantage of Java SE 5 Generics and should be able to find any factory defined with the bridge: namespace in the <factory-extension> section of a faces-config.xml descriptor. For example:
<faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd" xmlns:bridge="http://xmlns.jcp.org/xml/ns/bridge-5.0-extension"> <factory> <factory-extension> <bridge:bridge-context-factory>com.liferay.faces.bridge.context.internal.BridgeContextFactoryImpl</bridge:bridge-context-factory> </factory-extension> </factory> </faces-config>
Here is the proposed API:
public abstract class BridgeFactoryFinder { public static Object getFactory(PortletContext portletContext, Class<?> clazz) { return getInstance().getFactoryInstance(portletContext, clazz); } }
Example Usage:
BridgeContextFactory bridgeContextFactory = (BridgeContextFactory) BridgeFactoryFinder.getFactory(portletContext, BridgeContext.class);
- is related to
-
FACES-2809 Add a new chapter titled "Factories" to the Bridge Spec
-
- Closed
-