You have mistaken the 'Hyperlink' class - and yes, it is a common/easy 
mistake to make because of the naming. Hyperlink is a special type of link 
that deals with the GWT history stack. You sound like you are just looking 
for a simple html link, which is called an Anchor (<a> tag). You use it 
like this:

Anchor a = new Anchor("hi");
a.addClickhandler(new ClickHandler() {
     @Override
     public void onClick(ClickEvent event) {
           Window.alert("hi");
     }

});



On Tuesday, January 15, 2013 12:34:32 AM UTC+2, Glyndwr Bartlett wrote:
>
> I am new to both java and GWT and am using Eclipse (Juno with the GWT 
> plugin) to develop an application for a volunteer organisation. I have 
> created a class called AwardTracker (in org.AwardTracker.client) which is 
> my entry point. This displays a standard login page. I followed a tutorial 
> for this and it is working. The next part I want to implement is to build a 
> page to create an account. For this I have a “Create an account” hyperlink 
> on the login page. I have created a new Package 
> (org.AwardTracker.client.CreateAccount) to hold this class. 
>
> To create the class I am selecting, at the top of the page, Create new 
> visual classes / GWT / GWT Java UI / Composite is this the correct one?
>
> Once I have created the page how do I call it with the following event 
> handler?
>
>              Hyperlink hprlnkCreateAnAccount = *new* Hyperlink("Create an 
> account", *false*, "newHistoryToken");
>
>              hprlnkCreateAnAccount.addAttachHandler(*new* Handler() {
>
>                     *public* *void* onAttachOrDetach(AttachEvent event) {
>                     }
> Thanks,
> Glyn
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/dl6WlEiBsI0J.
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.

Reply via email to