我正在尝试 Primefaces 选择器,但它似乎无法更新panelGroup.
<h:panelGroup layout="block" styleClass="updateMe">
<h:outputText value="#{bean.value}"/>
</h:panelGroup>
<h:form>
<h:inputText value="#{bean.value}"/>
<h:commandButton value="submit">
<p:ajax process="@form" update="@(.updateMe)" oncomplete="alert(1)"/>
</h:commandButton>
</h:form>
在这种情况下,panelGroup永远不会更新。但是,如果我将其更改panelGroup为<p:outputPanel>,则效果很好。
观察生成的 HTML,唯一的区别是<span>生成的panelGroup没有idwhile 生成的outputPanel有id. 这可能是第一个没有更新的原因吗(cos jQuery选择器找不到组件ID?)
如果是这种情况,是否有任何其他组件没有任何 id 并且在使用 Primefaces 选择器时应该避免使用?