ANSWERED: How to edit List<entity> in UI ?

UI Components for JSF
Post Reply
brasta78
Posts: 4
Joined: 23 May 2015, 23:53

24 May 2015, 00:03

Hi,

I want to give for users edit List<entity> like we do in normal xhtml with:

Code: Select all

 <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...
Last edited by brasta78 on 26 May 2015, 15:58, edited 1 time in total.

brasta78
Posts: 4
Joined: 23 May 2015, 23:53

26 May 2015, 15:57

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

Code: Select all

     <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>

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

04 Jun 2015, 17:21

I like dialogs better for editing, especially on mobile devices. And they are much more performant when you have more than 50 rows in a page with e.g. 5-10 columns.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests