私のアプリケーションには、次のコードがあります。
<h:form>
<h:outputLabel for="type" style="font-weight: bold" value="*Type: " />
<h:selectOneMenu label="type" id="type" binding="#{type}">
<f:ajax execute="type" render="text article video" />
<f:selectItem itemValue="article" itemLabel="Article" />
<f:selectItem itemValue="video" itemLabel="Video" />
</h:selectOneMenu>
<p:message for="type" />
<h:outputText id="text" value="#{type.value}" />
<h:panelGrid id="article" rendered="#{type.value == 'article'}" >
...
</h:panelGrid>
<h:panelGrid id="video" rendered="#{type.value == 'video'}" >
...
</h:panelGrid>
</h:form>
メニューからオプションを選択すると、Ajax 呼び出しが正しく<h:outputText>
レンダリングされたため、Ajax 呼び出しが発生したことを確認できます。type.value
ただし、どれも<h:panelGrid>
レンダリングされませんでした。
この問題にどのように対処すればよいか教えていただければ幸いです。
よろしくお願いします、
ジェームズ・トラン