【发布时间】:2011-03-27 08:09:40
【问题描述】:
基本问题:
包括一个页面,其中包含一个具有组件 id 的组件,不能多次执行。但是我如何才能在包含页面之外引用该组件?
示例:
included.xhtml
....
<h:form id="foo"/>
....
<!-- here i need reference to foo component of this page -->
index.xhtml
....
<ui:include src="included.xhtml" />
<ui:include src="included.xhtml" />
<ui:include src="included.xhtml" />
【问题讨论】:
-
你想在哪里引用它?我的意思是你想从 javascript 中引用它吗?
-
我正在使用 primefaces,并且我想使用按钮的 ajax 调用的“更新”属性。该属性需要 clientId 作为值。我试图让这个主题不是特定的primefaces。