3 Replies Latest reply on Sep 20, 2007 11:06 AM by Alex Ka

    Remove or update entity from a EntityHome.resultList

    Erik Hellman Newbie


      I'm generating a table with a list of entities. For each row (entity) I put the values in h:inputText and I then have two links (or buttons, tried both), one for updating the entity and one for removing it. Basically this:

      <ui:repeat value="#{workShifts.resultList}" var="ws">
       <td><h:inputText value="#{ws.name}" /></td>
       <td><s:link action="#{workShiftHome.update}" value="Save" /></td>
       <td><s:link action="#{workShiftHome.remove}" value="Remove" /></td>

      I've tried setting a parameter for the s:link using f:param with the name workShiftId and value #{ws.id} and workShiftId declared in components.xml. Also, I tried using h:form and h:commandButton, without any success.

      I've been looking through the examples and cannot find anything to demostrate how to display a lsit of entities and provide a save or remove button/link for each row.

      Anyone know how to do this? Please help. :)


      // Erik