java - How to add a parameter to a URL in GWT? -


i have java/gwt application. in there list of items. if click on item title item opened full description.

i using anchor item title, want when user clicks on item title in url id of item appended current url.

for example, url:

"http://127.0.0.1:8888/myapp.html?gwt.codesvr=127.0.0.1:9997#listitem?list"

and have append id end of url like:

"http://127.0.0.1:8888/myapp.html?gwt.codesvr=127.0.0.1:9997#listitem?list&itemid=55"

using window.location should trick : see doc here

something :

string url = window.location.gethref(); url = url + "&itemid=" + itemid; window.location.replace(url); 

although of course, crollster pointed out, should insert url parameter before # sign. give more details on you're looking (why have add parameter manually, page have reload ...)


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -