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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -