This content has been marked as final.
Show 1 reply
-
1. Re: Same component name, different implementations?
mikkus70 Jan 12, 2010 12:00 PM (in response to andyredhead)There are several ways of doing this, an easy one is to just create an alias to the correct component using a factory:
<factory name="OrderFulfillmentDetails" value="#{orderFulfillmentManager.detail}" scope="CONVERSATION />
Where orderFulfillmentManager is a component that determines which implementation to use and returns it. If it is easier, you can also use an expression:
<factory name="OrderFulfillmentDetails" value="#{order.quote ? quotedOrderDetails : onlineOrderDetails}" scope="CONVERSATION" />
Where order.quote is a property that evaluates to true if the order has a quote, false otherwise.