0

I have problem with editing datatable with primefaces. I have tested datatableRowSelection example but it did'nt work. when I click on the button edit the dialog is displayed but with empty values. Please Help! here is my code: in: ListingPage.xhtml, I have:

                <p:column headerText="Edition">  
          <p:commandButton update="edition" oncomplete="marqueDialog.show()" image="ui-icon ui-icon-pencil">
              <f:setPropertyActionListener value="#{item}"  
                target="#{marqueController.selected}" />  
          </p:commandButton>

</p:column> 

width="400" height="500" showEffect="explode" hideEffect="explode" modal="true" >

    <h:panelGrid id="edition" columns="2" cellpadding="4">  

    </h:panelGrid>  
</p:dialog>  
JsfLearner
  • 11
  • 2

1 Answers1

0

See my answer to this question posted shortly before yours...

Cannot update a componet from p:commandLink 'update' attribute,the Link is persent in p:dataTable

The inside of the dialog should be in a seperate form from the dataTable.

EDIT: To clear confusion, DO NOT DO THIS:

<h:form ...>
  ...
  <h:form ...>
    ...
  </h:form>
  ...
</h:form>

Also, place a form INSIDE the dialog, do NOT encapsulate the dialog:

<h:form ...>
  ...
  <p:dataTable ...>
  ...
</h:form>

<p:dialog appendToBody="true" ...>
  <h:form ...>
    ...
  </h:form>
</p:dialog>

Something like the above should allow the commandButton update to occur to elements WITHIN the dialog.

Community
  • 1
  • 1
maple_shaft
  • 10,435
  • 6
  • 46
  • 74
  • thank you for your response but it did'nt work again. is encapsulated in and is encapsulated in Please can you explain more what I have to do? I'm confused – JsfLearner Sep 16 '11 at 16:44