I have something like <ui:repeat value="#{list}" var="a" />
where list
is of type List<Action>
and contains various objects that extend Action
. Depending on the actual type of Action
, I want to render a different composite component (for example, for ActionA
I want to render component A
and for ActionB
I want to render B
, where B
would throw an exception if it were to get a value of type ActionA
). How can I do this? It seems that using rendered="#{a.type == 'ACTION_A'}"
(where type
is a property of Action
) on the composite components doesn't work as each iteration of ui:repeat
adds all components to the tree so it sends the value a
to each composite.
Thank you.