0 Replies Latest reply on Aug 29, 2006 1:13 PM by zeddmaxim

    DataModel and DataModelSelection and

    zeddmaxim

      I've seen a few posts out there regarding this, and no one ever seems to come up with a solid answer, so I thought I'd post this in hopes someone will find it useful.

      I have a simple data table set up such as in the Message List example, with a clickable link in each row (to edit that object). No matter which row I clicked, the first item was always selected / injected. A similar table on another page in the same application (hitting the same SFSB!) worked just fine.

      Item (1) on page 13 of the Seam tutorial states:

      The @DataModel annotation exposes an attribute of type java.util.List to the JSF page as an instance of javax.faces.model.DataModel...
      The key to my understanding came out of when I finally realized that this meant it outjected the list. I had my h:dataTable's value set to SFSB-name.list (so it was calling the list's getter) instead of just the outjected "#{list}".

      Once I fixed this, the @DataModelSelection variable was populated perfectly.