Answer the question
In order to leave comments, you need to log in
How to parse parameters from URL in GWT application?
I fasten MVP to my application. It implements searching, adding and editing various users. I want to implement viewing a page with user data by specifying a URL with a user id. User page URL example:
http://127.0.0.1:8888/UsersTest.html?gwt.codesvr=127.0.0.1:9997#user:id=1385115818992
@Override
public UserFormPlace getPlace(String url) {
long id = Long.parseLong(Window.Location.getParameter("id"));
return new UserFormPlace(id);
}
http://127.0.0.1:8888/UsersTest.html?gwt.codesvr=127.0.0.1:9997#user:id=SOME_LONG_ID
- Throws a NumberFormatException. Window.Location.getParameter("id")
returns null
. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question