gwt - Why PlaceRequest doesn't work normally as we expected (GWTP)? -
i using gwtp. there method openurl following:
public void openurl(int key){ placerequest request = new placerequest(nametokens.search).with("showdata", "y"); if(key==1){ request.with("firstvariable","2154"); } else if(key==2){ request.with("secondvariable","4454"); } string url = window.location.createurlbuilder().sethash(placemanager.buildhistorytoken(request)).buildstring(); window.open(url, "_blank", null); }
there button call openurl(1)
, after clicking button open url in form:
abc.com#search;showdata=y
clearly above url missing firstvariable
param part.
the correct url should be
abc.com#search;showdata=y;firstvariable=2154
i don't know why gwtp didn't read request.with("firstvariable","2154");
part expected.
can find out solution?
request.with(param, value) returns new placerequest, so
request = request.with("firstvariable","2154");
is need.
Comments
Post a Comment