【发布时间】:2013-05-29 09:39:59
【问题描述】:
我有以下(简化,但问题可以演示)组件my:slot
<composite:interface>
</composite:interface>
<composite:implementation>
<h:panelGroup styleClass="xxx" layout="block">
<composite:insertChildren/>
</h:panelGroup>
</composite:implementation>
现在我想通过两种形式来广告表单来使用这个组件:
<my:slot>
<h:form id="f3">
<p:commandButton value="update f4" update=":f4"/>
</h:form>
</my:slot>
<my:slot>
<h:form id="f4">Form f4</h:form>
</my:slot>
使用此代码,我收到错误 Cannot find component with identifier ":f4" referenced from "j_idt11:f3:j_idt12"。如果我在my:slot 之外使用h:form id="f4" 就可以了。如上所示,如何在自己的组件中使用h:form?
【问题讨论】:
标签: ajax jsf-2 facelets composite-component