Title: Message
You set up employee to have a managed reference to employees.  Then, once control reaches Employee.edit(), its reference to employees will have been set up already by JSF.
 
- Brendan
-----Original Message-----
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Monday, August 29, 2005 2:33 PM
To: MyFaces Discussion
Subject: Re: Concerning DataModel usage plus overhead?

On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:
Yes, you could do your own parameter passing.  It's just that JSF offers the DataModel abstraction such that, when the user clicks on your link, your program just has to ask DataModel for rowIndex to locate the row that was selected.  It's designed to simplify your coding.

Where should I look for a good of this? Also does it work when you need access to the DataModel from a different backing bean that created the DataModel? For example...

<h:dataTable var="emp" value="#{employees.employees}" > <!-- employees is a backing bean that will generate a DataModel of 'employees' -->

Now I want a link in on row that will call "employee.edit" that will go to "Employee.java" backing bean and enter the 'edit' method where I can pull out the 'id' that is is found in the bean for the current row of my DataModel. How do I get a handle to this DataModel from a totally different backing bean then the one that created the DataModel?

thanks for the help

--
Rick

Reply via email to