On 8/30/05, Rick Reumann <[EMAIL PROTECTED]> wrote:

>>>>>
I'm still a bit confused on how you deal with links that go to backing
bean methods for standard links/buttons. As an example, imagine the
header on a page...

John Doe    [edit user] [logs for user] [user summary]  [look up company]
1455 some address    [edit address]
Somewhere, state, 12456

The example above is a bit exaggerated, but the point is the links(or
even buttons) would have to access methods in all different kinds of
backing beans.
<<<<<<<<<<

When my day job stops taking way into the night hours :-), I'm gonna do the port of mailreader (which includes exactly this sort of use case).  But the basic idea  is to do what I said in a previous message ... inside your table, include a hidden field that is bound to the primary key field from your underlying data.  Like all the other column components, JSF will create multiple values for this hidden field (one per row).  And, when the per-row "edit address" button is pushed, the table component will reposition to the current row's values *before* calling the action method -- so, your action method code can pull out the primary key value and pass it on to the details page (via a request attribute, or the property on some request scoped bean, or whatever).

The table keeps track of row positions for you, so you don't have to.

Craig

Reply via email to