ajax呼び出しでダイアログボックスをポップアップしたいのですが、私は非常に多くの方法を試みましたが、解決策が見つかりませんでした。誰でも助けてくれてありがとう。p:ajaxの完了していない属性にダイアログが表示されない
XHTMLコードは、AJAXイベント=「変化」がラジオボタンの下盛ない
<h:body>
<h:form>
<p:selectOneRadio style="margin-left:10px" value="#{newSubBean.selectedEvent}"
required="true" layout="pageDirection">
<f:selectItems value="#{newSubBean.events}" var="item"
itemValue="#{item.eventId}" itemLabel="#{item.title}" />
<p:ajax event="change" update="dt" oncomplete="PF('sub').show()">
</p:ajax>
</p:selectOneRadio>
<p:dialog visible="true" id="dialog" widgetVar="sub"
header="Previous Subscriptions" showEffect="explode" hideEffect="bounce">
<p:dataTable id="dt" style="width:800px"
value="#{newSubBean.subscribedEventList}" var="rows">
<f:facet name="header">
<p:outputLabel value="Previous Subscriptions">
</p:outputLabel>
<br/>
<p:outputLabel styleClass="preformatted"
value="#{newSubBean.eventName}">
</p:outputLabel>
</f:facet>
<p:column headerText="Subscribed Notification">
<p:outputLabel value="#{rows.notificationType.title}">
</p:outputLabel>
</p:column>
<p:column headerText="Subscribed Template">
<p:outputLabel value="#{rows.notificationTemplateDetail.title}">
</p:outputLabel>
</p:column>
<p:column headerText="Subscription Time">
<p:outputLabel
value="#{rows.insertionTimeStamp.getTime().toLocaleString()}">
</p:outputLabel>
</p:column>
</p:dataTable>
<p:commandButton value="Close" onclick="PF('sub').hide();">
</p:commandButton>
</p:dialog>
</h:form>
</h:body>
フォームの外にダイアログを作ります。フォーム内にdataTableを挿入し、更新しようとするとdataTableフォームを更新します。 –
@yagamiLight:なぜですか?私はこれを必要としません。 – Kukeltje