I repeat some of the data and create parameterized URLs based on the following conditions:
finishedHTML.append("<a href=\"http://" + domain + "&service=" + allEvents[eventCounter].EventService +"&day="+ offSet+(-1 * i) +"\"><img src=\"/info.jpg\" alt=\"Info\"/>");
I had the beginning of my application checking the parameters of the url when the page was loaded / updated, and follow some steps depending on whether the parameters were and what they were.
However, I added # to the beginning of the parameters, so there is no need to refresh the page, but now it does not start the function that checks the URL.
My question is, how can I trigger an event in GWT when a user clicks a link? Do I need to generate GWT controls and bind a click handler? Is it possible to set up an event that fires when a URL changes?
UPDATE: Adam answered part of the original question, but I cannot get querystring after "#". Is there a better way than the function below:
public static String getQueryString() { return Window.Location.getQueryString(); }
In other words, if I enter example.com?service=1 , I get service = 1 as my request. If I enter example.com#?service=1 , I get a null value for the request.
source share