Method in dialog executed before method in commandLink which shows the dialog
<p>I have an issue with JSF pop up window: </p>

<p>this is the code that calls popup: </p>

<pre><code>&lt;p:commandLink id="emmiSumTableColumnValue5YesLink"
                                    type="button" value="Yes"
                                    rendered="#{summary.mE.exist}"
                                    action="#{UserBean.inokeProgramms()}"
                                    oncomplete="PF('view').show();"&gt;
                                    &lt;f:param name="UserCode"
                                        value="#{summary.mE.accessCodeId}" /&gt;
                                &lt;/p:commandLink&gt;
</code></pre>

<p>This is dialog 'view' which should calls after commandLink action executed:</p>

<pre><code>&lt;p:dialog closable="true" modal="true" closeOnEscape="true" 
       resizable="false" appendToBody="true" header="#{pocMsgBundle.title}"
       widgetVar="view" draggable="false" dynamic="true" height="500" width="600"&gt;
&lt;p:scrollPanel mode="native" style="height:500px"&gt;
&lt;p:dataTable id="eMTable" scrollable="true" value="#{UserBean.selectedProgram}" var="sProgram" emptyMessage="No data available."&gt;
&lt;p:column&gt;
&lt;p:panelGrid columns="1"&gt;
&lt;p:column&gt;
&lt;h:outputText id="eMTimestamp" value="#{sProgram.entryDateTime}"&gt;
&lt;f:convertDateTime pattern="MM/dd/yyyy hh:mm a" timeZone="#{UserBean.timeZone}"/&gt;
&lt;/h:outputText&gt;
&lt;/p:column&gt;
&lt;p:column&gt;
&lt;h:outputText id="eMText" value="#{sProgram.text}" /&gt;
&lt;/p:column&gt;
&lt;/p:panelGrid&gt;
&lt;/p:column&gt;
&lt;/p:dataTable&gt;
&lt;/p:scrollPanel&gt;
&lt;/p:dialog&gt;`
</code></pre>

<p>Method from dialog <code>UserBean.selectedProgram</code> calls earlier than <code>UserBean.inokeProgramms()</code> in commandLink action. </p>

<p>how can I fix this? </p>

<p>Thanks. </p>

<p><strong>SOLUTION</strong>
I added ID for dialog and use update action in commandLink block for dialog ID </p>