0
我目前使用這樣的事情在複合組件來創建一個EL引用的資源
<composite:implementation>
<ui:param name="resourceName" value="images:#{cc.resourceName}" />
<h:commandButton id="button" image="#{resource[resourceName]}" />
</composite:implementation>
正如你所看到的,ui:param
指組件類中名爲getResourceName()
的方法。此方法確定要加載哪個資源。
我想有一個解決方案,整個ui:param
事情是不必要的,是這樣的:
<composite:implementation>
<h:commandButton id="button" image="#{cc.resource}" />
</composite:implementation>
目前,我甚至不知道這是可能的。
任何想法?
THX, DS