0
votes

I have an array list to show in a p:dialog and this list was changed when i click on command Button. Then I want to know how i can show the content of list for each change during excution of method in managed bean??

Synchronization between the iterative process in the managed bean and (DataList/progressbar) in a DialogBox.

DIALOG:

    <h:body><h:define name="dialogBox"><p:dialog id="genDialog" header="Opération de génération"  modal="true"  widgetVar="dlg1">  
              <h:outputText value="le traitement de la génération est en cours..." /> 
              <p:dataList id="sitesDataList" value="#{generationBean.generatedSites}"    var="siteStatus" itemType="square" >

                    #{siteStatus.site} ---------------> #{siteStatus.status}

              </p:dataList>

            </p:dialog>
</h:define >
</h:body>

CommandButton:

   `<h:form  id="form1" > <h:panelGrid  columns="2" id="panButton">` <p:commandButton  id="genbutton" style="margin-left: 930px"  value="#{generationBean.labelBoutonGen}"   immediate="true"  global="false" onstart="dlg1.show()"
                                          actionListener="#{generationBean.genererDPT}"   rendered="#{ generationBean.selectedRegion ne 'choix'}"  update="sitesDataList">

 </h:panelGrid  > </h:form>`

I'm running primefaces 3.5 in glassfish server

1

1 Answers

1
votes

Add update="sitesDataList" to your command button. If the command button and the data list are not in the same naming container, then you need to provide the full path to the datalist, something like update=":myFormId:level1ContainerId:level2ContainerId:etc:sitesDatalist". Without seeing the complete code, I cannot give you an exact answer.