java - How to remove hash parameters from URL in GWT application -
for example have below url:
http://server:port/?parameter#token;id=com.test;args=one&two&three
here if want remove id , args url without reloading page how it.
note:right doing below code , looking better option
placerequest currentplacerequest = placemanager.getcurrentplacerequest(); final string counts= currentplacerequest.getparameter( "args", null ); string id = currentplacerequest.getparameter( "id", null ); string url = window.location.gethref(); if( counts!= null && !counts.isempty() ) { if( id!= null && !id.isempty() ) { string counts= ";" + "args" + "=" + counts; string urltoreplace = url.replace( counts, "" ); window.location.replace( urltoreplace ); }
you can retrieve current token using history.gettoken
, process , set using history.newitem
. note depending on setup (using activities , places or mvp4g/gwtp, etc) trigger activity in application.
Comments
Post a Comment