1 Reply Latest reply on Nov 28, 2006 7:39 PM by None None

    Dumb question: Links from a datatable

    None None Master

      This is a totally dumb question but I have been trying to figure this out all day and I'm not making progress.

      I have a Seam application. Like many applications, it displays a bunch of stuff in a DataTable. I happen to be using the Tomahawk DataTable, but it shouldn't be that different from a plain JSF DataTable.

      Anyway, this table holds a list of Books. The last column is a link for Details, so you could click on that and get the details of the book.

      The obvious way to do that is to have a Book as a DataTableModelSelected member. The user clicks the link, that book is selected, and it navigates over to the book-details.jsf page.

      But none of this is working. I tried with a commandLink and commandButton, and they both correctly set the DataTableModelSelected member. But, no matter what their action is, they just redisplay the page instead of navigating on to the book-details.jsf page. I then tried to use a Seam s:link, and got the same behavior.

      Surely there's a way to do this? This is just basic stuff. In PHP I would have used href="book-details.php?bookId=..." and that would have worked. Why is this so much harder in Seam?