[英]jsf composite component nested EL
嗨,我想将bean作为参数复合组件传递,然后将其功能称为动作。
<cc:attribute required="true" name="daobean" />
<ui:param name="daobeann" value="#{cc.attrs.daobean}" />
<p:commandButton action="#{daobeann.update}" />
我使用该组件作为
<util:mycomponent daobean="mybean" />
但是我找不到mybean.update()。
如何调用更新方法?
ui:param
用于模板目的。 您在这里不需要它。
只需使用正确的复合接口和实现
<cc:interface>
<cc:attribute required="true" name="daobean" />
</cc:interface>
<cc:implementation>
<p:commandButton action="#{cc.attributes.daobean.update}" />
</cc:implementation>
然后像这样从父页面引用它
<util:mycomponent daobean="#{mybean}" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.