以下が機能する理由:
<h:form id="form1">
<p:carousel id="carousel" value="#{galleriaBean.paths_tn}" var="img" itemStyle="width: 200px">
<p:graphicImage value="#{img}"/>
</p:carousel>
<p:commandLink id="here" value="click me" update="hello11" oncomplete="dlg.show()">
<f:setPropertyActionListener value="hello!!!" target="#{galleriaBean.selected}"/>
</p:commandLink>
<p:dialog widgetVar="dlg">
<h:outputText id="hello11" value="#{galleriaBean.selected}"/>
</p:dialog>
</h:form>
しかし、commandLinkをカルーセルに移動すると、機能しませんか?setPropertyActionListenerは、Beanに変数を設定することさえしません。
@RequestScopedCDIBean。
<p:carousel id="carousel" value="#{galleriaBean.paths_tn}" var="img" itemStyle="width: 200px">
<p:graphicImage value="#{img}"/>
<p:commandLink id="here" value="click me" update=":form1:hello11" oncomplete="dlg.show()">
<f:setPropertyActionListener value="#{img}" target="#{galleriaBean.selected}"/>
</p:commandLink>
</p:carousel>