The easiest way is probably to extend button class to hold an extra
id. Smth. like (not checked - just to give you an idea):

class myButton extends Button
{
  private int id;

  Button(int id)
  {
    this.id = id;
    super();
  }

  public int getId()
  {
    return id;
  }
}

Every time you instantiate a Button - give it your primary key to
hold. Every time you click on it use getId() to retrieve the primary
key.

On 4 Mrz., 22:14, "fatjack1...@googlemail.com"
<fatjack1...@googlemail.com> wrote:
> Hi,
>
> I have a rather straight forward question that is driving me up the
> wall trying to solve. Im sure someone on here can help me. So here
> goes:
>
> Basically I have a list of records created in a for loop and a Button
> which I want to associate with each record. I need to make a listener
> that takes say the primary key of the associated Record when the
> button is clicked. However, I cant for the life of me work out how to
> implement this.
>
> Please can someone point me in the right direction?
>
> Regards,
> Jack
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to