How to pass a action string into a JSF 2 composite component?

Posted by Brian Leathem on Stack Overflow See other posts from Stack Overflow or by Brian Leathem
Published on 2010-05-17T18:33:23Z Indexed on 2010/05/18 9:10 UTC
Read the original article Hit count: 233

Filed under:
|

I'm creating a simple menuing composite component in JSF 2. However, I am unable to pass a String attribute into the composite component to use in the action attribute of the <h:commandLink>. My component looks like:

<composite:interface>
    <composite:attribute name="title" required="true" type="java.lang.String"/>
    <composite:attribute name="view" required="true" />
</composite:interface>

<!--implementation-->
<composite:implementation>
    <li><h:commandLink action="#{cc.attrs.view}" value="#{cc.attrs.title}" /></li>
</composite:implementation>

How can I get an action String into the action attribute of the <h:commandLink>?

© Stack Overflow or respective owner

Related posts about jsf

Related posts about jsf2