On 10/11/2010 09:30 AM, Il Lupo wrote: > I have been searching around for this with no luck so I decided to > post the question hoping to get a quick and straight answer. > Is there a way to hook up GWT java methods/classes to straight HTML? > I can see a way to do it with DIVs (retrieval via id) but cannot find > a way to do it on other HTML tags. > Example: > say I have a menu implemented with CSS and the following HTML snippet > > ... > <ul> > <li><a href="...">One</a></li> > <li><a href="...">Two</a></li> > <li><a href="...">Three</a></li> > </ul> > ... > I want to run GWT code (some method in some java class) when the user > clicks on one of the anchors. > Is there a way to do it? > > Or as an alternative, if I define some <ul>/<li> gropus in an html > file, is there a way to "surface" that in GWT? (by surface I mean a > way to retrieve it with code and operate on it). > >
The first place to start: http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html#writing then > ... > <ul> > <li><a href="javascript:foo()">One</a></li> > <li><a href="javascript:bar()">Two</a></li> > </ul> > ... -- 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.
