我在渲染参数中的 f:ajax 标记中遇到了动态生成的 id 问题。我得到错误:
Component with id:pak_Internet not found
viewId=/start.xhtml
location=C:\servers\apache-tomcat-7.0.29\temp\tst-web-war\start.xhtml
phaseId=RENDER_RESPONSE(6)
Caused by:
javax.faces.FacesException - Component with id:pak_Internet not found
at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.getComponentId(HtmlAjaxBehaviorRenderer.java:411)
代码:
<ui:repeat var="servicesPhones" value="#{cc.attrs.limits.servicesLimits}">
<h:selectOneMenu
value="#{cc.attrs.limits.phoneSelected}">
**<f:ajax render="pak_#{servicesPhones.name}" event="change" execute="@this"/>**
<f:selectItems value="#{cc.attrs.limits.getPhones(servicesPhones.name)}" />
</h:selectOneMenu>
<h:panelGroup id="pak_#{servicesPhones.name}">
<ui:repeat var="pak" value="#{cc.attrs.limits.getPackages(servicesPhones.name)}">
#{pak.name}<br/>
</ui:repeat>
</h:panelGroup>
</ui:repeat>
知道如何解决这个问题吗?