在选择一行时,我需要更新ui中的页面:插入p:对话框。加载页面时我的问题是我可以选择行并获取数据。选择另一行后,我无法获取。没有采取任何行动。 这是我的dataTable
<p:ajax event="rowSelect" update="samples" />
<p:ajax event="rowUnselect" update="samples" />
<p:column headerText="SNo" style="width:20px;" >
#{rowIndex+1}
</p:column>
<p:column headerText="PatientId">
#{patServ.patientOrder.patientEpisode.patientRegistration.patientId}
</p:column>
<p:column headerText="Patient Name" >
#{patServ.patientOrder.patientEpisode.patientRegistration.firstName} #{patServ.patientOrder.patientEpisode.patientRegistration.lastName}
</p:column>
<p:column headerText="Visit ID">
#{patServ.patientOrder.patientEpisode.id}
</p:column>
<p:column headerText="Order ID">
#{patServ.patientOrder.id}
</p:column>
<p:column headerText="Barcode ID" >
<p:outputLabel value="#{resultEntryBean.getBarcodes(patServ.id)}" />
</p:column>
<p:column headerText="Department Name" >
#{loginBean.getSpecialityName( patServ.serviceLabData.serviceHeaderData.speciality )}
</p:column>
<p:column headerText="Service Name" >
#{patServ.serviceLabData.serviceHeaderData.serviceName}
</p:column>
<p:column headerText="Ordered Date">
<p:outputLabel value="#{patServ.createdOn}">
<f:convertDateTime pattern="dd/MM/yyyy hh:mm a" type="date" timeZone="IST" />
</p:outputLabel>
</p:column>
<p:column headerText="Status">
<p:outputLabel value="#{resultEntryBean.status == 3 ? 'Acknowledged': resultEntryBean.status == 5 ? 'Result Entered': resultEntryBean.status == 6 ? 'Result Authorized' : 'Result Deauthorized'}" />
</p:column>
<p:column>
<p:commandButton value="Print" icon="ui-icon-print" update="reportContent" disabled="#{empty resultEntryBean.selectedPatientService}" onclick ="PF('templateDlg').show()" ajax="true"/>
</p:column>
</p:dataTable>
即时更新ui中的xhtml:在对话框中包含
<p:dialog id="mainDialog" header="Selected Template" widgetVar="templateDlg">
<h:panelGroup id="reportContent">
<ui:include src="#{resultEntryBean.selectedTemplate()}.xhtml"></ui:include>
</h:panelGroup>
</h:form>
我应该如何更新ui中的xhtml文件:包含p:dialog