我在JSF 2中創建了一個簡單的菜單複合組件。但是,我無法將字符串屬性傳遞到複合組件中,以便在< h:commandLink >的action屬性中使用。我的部分看起來像:如何將操作字符串傳遞給JSF 2複合組件?
<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>
我怎樣才能得到一個動作串入< H的action屬性:commandLink >?
這很完美,謝謝Cay - 有一位像你這樣的專家加入了stackoverflow社區真是太棒了! – 2010-06-24 16:31:50
永遠在你的遊戲之上,Cay;)謝謝! – Lincoln 2011-11-11 08:33:46