Hi RyanZA, Yes you are correct. I found this out a while ago but was not able to amend this as it took so long for the moderators to realese it (no criticism of the moderators intended; they do a very good job and are very busy). I replaced it with a and added a click event to that. Regards, Glyn
On Friday, 18 January 2013 01:36:06 UTC+11, RyanZA wrote: > 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/-/6khsBD4VsWcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.