Technically no, that's like saying "I have this tire here, how do I cast it to a pickup truck? I want to use it to haul a couch." That isn't even a reasonable thing to expect ...
HOWEVER ... Some widgets have a static wrap() method that allow you to connect elements that exist in DOM to the GWT event mechanism adding all the extra "Widget" bits in the process. Your element needs to be connected to DOM, and it needs to adhere to any expectations that are made by the wrapping widget. Though GWT does try its best to protect you here, this is an area where you can certainly shoot yourself in the foot if you aren't paying attention ... "hey, I've got this skateboard wheel here, add the pickup truck bits for me so I can haul this couch." <-- also unlikely to work as expected. -jason On Oct 29, 2008, at 12:42 AM, mat wrote: > > Hi, > > I have created a Html table using a String builder (which i chose over > using FlexTable / Grid because of performance reasons). > > Now, the problem is that I want to add a TableListener for this > table. > > Is there a way to cast a DOM element into a Widget so I can add Event > Handlers? > > Many Thanks, > Mathew > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
