views:

251

answers:

1

hi all, i am using GWT 1.6 and i am pretty new to it.

my question is about the use of a button as part of a grid row. how can the onClick method that the button has refer to the data in the grid? how i can make the button be aware to its raw and the other data that exists on the same row ??

thanks Me

+1  A: 
  1. Adding anonymous click listeners refer to outer data (declared "final" of course).
  2. Keep Map (or Map) and one reusable click listener. Perhaps using some button id as a key would be better.
  3. In a listener refer to button's element and walk through DOM to the parent and down to required data.
  4. In some GWT extensions have data to list/grid/tree items binding mechanisms.

Do you need some details about options above?

nomad