There is another approach that I use with a dataTable, maybe it works also for a dataGrid: if your list is loaded using a DataModel, you can simply ask that object the current row in your backing bean.
Cosma
2006/5/23, Alex Burton <[EMAIL PROTECTED]>:
Thanks Volker.
How do you catch the 'row id' though?
Cheers,Alex.On 5/23/06, Volker Weber < [EMAIL PROTECTED]> wrote:Hi Alex,
we do this by using h:commandlink, with parameter, for displaying the row data.
But you need to hit the text when clicking on a row.
regards,
Volker
2006/5/23, Alex Burton < [EMAIL PROTECTED]>:
> Hi all,
>
> I'm trying to use a datagrid as a way to quickly find and select a
> particular item from a large list of items. The items have several
> attributes I wish to display and can number in the 100's, so a drop down
> list isn't the right way to go...
>
> So... I have my datagrid displaying beautifully... but am now stumped on
> how to throw an even to catch a row selection... I know there are the
> rowOnClick="_javascript_" attributes in the datagrid, but how do i bind that
> to something useful?
>
> Anyone have any pointers? Ideally I'd like to get the "forceIdIndexFormula"
> value (or object it represents in my backing bean).
>
> Thanks in advance,
> Alex.
>
> --
> "We should move forwards, not backwards, upwards, not sideways, and always
> twirling, twirling towards victory!"
--
"We should move forwards, not backwards, upwards, not sideways, and always twirling, twirling towards victory!"

