primefaces-mobile

Primefaces mobile - how to edit List<entity> in UI?


I want to give for users edit List of entities like we do in normal xhtml with:

<p:dataTable id="salesTbl" var="line" value="#{indexBean.linesList}" editable="true" editMode="cell">

what is the proposal to do that in mobile UI because above example don't work...


Solution

  • I did it by adding a buttons in a rows and on press just popup dialog with ability to change this entity. example:

     <p:column headerText="Quantity">
         <p:commandButton  oncomplete="PF('lineDialog').show()" value="#{line.quantity}"  update=":panelForm:lineDetail">
            <f:setPropertyActionListener value="#{line}" target="#{indexBean.editedLine}"/>
         </p:commandButton>
      </p:column>