Download the <a href='google.ca?q=download+gwt+incubator'>incubator</a>, and
use the HyperlinkOverride class as an example.
It is a proposed change to the regular Hyperlink object that cares not
whether the alt, ctrl or shift buttons are pressed {allowing users to spawn
multiple pages of your app at once}. It implements ClickListener, so it's
not really 1.6 friendly, but it DOES show you how override the general
functionality of one class with another.
If you redo this class with your own event handling mechanism, you can just
deferred-binding overwrite all your hyperlinks with some fancy new class
that does whatever you need.
For example, one hack I've been known to use is to give a group of
button-links titles that start with different characters, and then sub in a
class that auto-adds a single static listener that switches over the first
character of the target element's title to call some static tasks {think OK,
Cancel, Help buttons, with anonymous inner class implementations}. ...I
only use this hack so I can just define an interface and some static
functions to reduce boilerplate code on tiny projects...
<replace-with class="com.yourdomain.ui.LinkOverride">
<when-type-is class="com.google.gwt.user.client.Hyperlink" />
</replace-with>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---