Anchor Issues

20 views
Skip to first unread message

Killian

unread,
Jul 11, 2011, 6:39:36 PM7/11/11
to google-we...@googlegroups.com
Hi Lads,

I'm feeling kind of silly asking this question cos it might be a really simple thing but since I've been browsing around for hours without any solution, I'm thinking it might be worth to ask afterall.

The problem is super simple. I'm simply trying to use Anchors in my gwt code and basically they only working half of the time which is really nerve breaking ! When a page is loaded a first time the links are not clickable and after refreshing a few times, these links suddenly become clickable again ! I've testing this on Firefox and Chrome and the same thing happens.

I've tried multiple combinations of things which don't have any impact 

This is the code I'm using:

final Anchor loginAnchor = new Anchor(""); // or new Anchor(); doesn't work either

String URL  = userService.createLoginURL(requestUri);

loginAnchor.setHref(URL);

loginAnchor.setText("Login1");


However, I did notice something interesting. Whenever the URL starts by http:// or https:// this is when the problem occurs. If I set the url to something like "www.google.com" it works fine.


I thought great that's my problem solved, I'll just remove the "https://" from the URL string, however when I do this, string URL is simply appended to the current url location ! 


I can't believe I'm getting bugged down by something apparently so simple ! Is this a bug or am I simply doing something obviously wrong which I can't figure out?


Thanks for your help in advance :-)



yes2000

unread,
Jul 11, 2011, 10:24:28 PM7/11/11
to google-we...@googlegroups.com
You should look at GWT ShowCase HyperLink example.


Reply all
Reply to author
Forward
0 new messages