title: Primefaces Datagrid: Dialog not getting updated with selected values
body: <p>I have an issue with primefaces datagrid.I am trying to update the dialog box with the selected values on click of p:commandLink.
  The Dialog doesnt display any values initially but it gets updated with the previously selected values when i refresh the page and click on commandLink.
  I am using primefaces-2.2.1 on JBoss 4.3.0.Any help would be appreciated.</p>
  
  <p></p>
  
  <pre><code>  &lt;p:column&gt;
       &lt;p:panel header="#{loc.loc_details}" style="text-align:center"&gt;
          &lt;h:panelGrid columns="1" style="width:100%"&gt;
             &lt;p:graphicImage value="/user/xyz/resources/images/#{loc.loc_details}.jpg"/&gt; 
  
             &lt;h:outputText value="#{loc.locality}" /&gt;
             &lt;h:outputText value="#{loc.city}" /&gt;
             &lt;h:outputText value="#{loc.state}" /&gt;
             &lt;p:commandLink  update="locDetail,locDetailGrid" oncomplete="locDialog.show()" title="View Detail" border="0" &gt;
                 &lt;p:graphicImage value="/user/xyz/resources/images/imagesCA6ETPOM.jpg" /&gt;
                &lt;f:setPropertyActionListener value="#{loc}" 
                      target="#{tutorialsBean.selectedLocality}" /&gt;
             &lt;/p:commandLink&gt;
          &lt;/h:panelGrid&gt;
       &lt;/p:panel&gt;
    &lt;/p:column&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;p:dialog header="Loc Detail" widgetVar="locDialog" modal="true"&gt;
    &lt;p:outputPanel id="locDetail" style="text-align:center;" layout="block"&gt;
  
  
  
       &lt;h:panelGrid id="locDetailGrid" columns="2" cellpadding="5"&gt;
          &lt;h:outputLabel for="loc_details" value="Locality Details :" /&gt;
          &lt;h:outputText id="loc_details" value="#{tutorialsBean.selectedLocality.loc_details}" /&gt;
  
          &lt;h:outputLabel for="city" value="City: " /&gt;
          &lt;h:outputText id="city" value="#{tutorialsBean.selectedLocality.city}" /&gt;
  
          &lt;h:outputLabel for="state" value="State: " /&gt;
          &lt;h:outputText id="state" value="#{tutorialsBean.selectedLocality.state}" /&gt;
          &lt;h:outputText styleClass="text_normal" value="First Name" /&gt;
          &lt;p:inputText id="fnameText" value="#{tutorialsBean.firstName}" /&gt;
          &lt;h:outputText styleClass="text_normal" value="Last Name" /&gt;
          &lt;p:inputText id="lnameText" value="#{tutorialsBean.lastName}" /&gt;
           &lt;h:outputText styleClass="text_normal" value="Email" /&gt;
          &lt;p:inputText id="emailText" value="#{tutorialsBean.email}" /&gt;
          &lt;p:commandButton id="searchButton"  
             value="Submit" action="#{tutorialsBean.submitValues}"
             styleClass="button" /&gt;
  
       &lt;/h:panelGrid&gt;
    &lt;/p:outputPanel&gt;
  </code></pre>
  
  <p></p>