Assigning ID to a widget using GQuery

70 Views Asked by At

I need to wrap a widget with an ID, so I used GQuery to do that, like so:

GQuery g = $(signupButton);
g.id("signupButton");

Now I need to get the instance of the actual Button or Widget using the GQuery object, is that possible?

Will the g.get(0) return the wrapped instance of that Button/Widget?

1

There are 1 best solutions below

0
On BEST ANSWER

use the widget() method

Button b = g.widget();

//later if you want to query your button via its id
Button b = $("#signupButton").widget()

Julien