1 Reply Latest reply on Dec 20, 2007 6:19 AM by Pete Muir

    How to select item in DataTable populated with @Unwrap?

    Mark Teichmann Newbie

      I like to use the Seam Manager Component pattern in Seam 2.0.0.GA and provide a list using @Unwrap:

      public class HolidayRequestByApproverList {
       public List<HolidayRequest> getHolidayRequestByApproverList() {
       return myList;

      In a datatable I display the list :

      <rich:dataTable id="dtHolidayRequestList" var="holidayRequest"
       rendered="#{not empty holidayRequestByApproverList}">
       <f:facet name="header">
       <s:span styleClass="columnHeader">Nr</s:span>
       <f:facet name="header">Action</f:facet>
       <s:button value="Reject"

      But in my action I always get null instead of holidayRequest that I selected in datatable.

      public class HolidayApprovalActionImpl implements HolidayApprovalAction {
       private static final long serialVersionUID = 6068522266849679060L;
       @PersistenceContext(type = PersistenceContextType.EXTENDED)
       EntityManager entityManager;
       public void reject(HolidayRequest hr) {

      I read chapter 30.1 of Seam Reference 2.0.0.GA several times and maybe some limitations occur when using JSF but I also tried using facelets and also got 'null' instead of my selected item.

      Also in chapter 30.1.1 it is told in a note that you cannot use objects as arguments therefore I also tried using holidayRequest.id as parameter but then I got 0 instead of the id of the selected item.

      I used DataModel and DataModelSelection before but then the displayed data in rich table was not refreshed correctly. Therefore I tried to use Unwrap which works perfectly but now I cannot select an item and paa it to my bean.