【发布时间】:2019-01-14 11:04:48
【问题描述】:
我有以下结构的 xhtml:
<h:form id="frmMain2">
<f:subview id="sub1">
<ui:repeat var="vatId" value="#{someBean.suppliesKeys()}" id="rep1">
<fieldset>
<legend>vatId</legend>
<h:panelGroup id="panel">
<ui:repeat var="item" value="#{someBean.supplies[vatId]}" id="rep2">
<f:subview id="sub2">
<h:commandLink id="command">
${item}
<f:ajax
event="click"
render=":frmMain2:sub1:rep1:0:panel">
</f:ajax>
</h:commandLink>
</f:subview>
</ui:repeat>
</h:panelGroup>
</fieldset>
</ui:repeat>
</f:subview>
</h:form>
这是通过 Portlet 桥在 Websphere Portlet 中运行的,这意味着我被 Myfaces 2.0 卡住了。
我面临的问题是我收到以下错误:
javax.portlet.PortletException: Component with id::frmMain2:sub1:rep1:0:panel not found
请注意,我试图在 f:ajax 渲染 (:frmMain2:sub1:rep1:0:panel) 中引用面板的第一次迭代。
如果我引用了其他内容(迭代部分之外),例如:frmMain2:sub1:rep1,组件被找到,portlet 工作。
我找不到如何在渲染属性中引用一些迭代组件。
发现以下帖子描述了此问题在 Mojarra 较新版本中已解决,但 Myfaces 2.2.7 并未解决该问题:How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar"
那么,有没有办法在 f:ajax 中引用我要渲染的组件?
【问题讨论】:
-
有比2.2.7(2.2.12)更新的版本,试过了吗?
标签: jsf myfaces websphere-portal