Hello
I have such class:
public class Main extends UI
{
private String lang;
private String id;
@Override
protected void init(VaadinRequest request)
{
getSession().addRequestHandler(new RequestHandler()
{
@Override
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response)
throws IOException {
Map<String, String[]> map = request.getParameterMap();
this.lang = request.getParameter("lang");
this.id = request.getParameter("id");
return false;
}
}
);
getPage().addUriFragmentChangedListener(new UriFragmentChangedListener()
{
@Override
public void uriFragmentChanged(UriFragmentChangedEvent source)
{
enter(source.getUriFragment());
}
}
);
Navigator navigator = new Navigator(this, this);
navigator.addView(MainAppView.NAME, new MainAppView());
navigator.addView(FormAppView.NAME, new FormAppView());
}
private void enter(String uriFragment) {
}
}
When I am trying to access FormAppView and pass parameters to it like this: http://localhost:8080/MainApp/#!FormAppView/?lang=en&id666 using getParameter() I always got request.getParameter(“lang”); and request.getParameter(“ld”) = null. Does anyone know where is the problem? I missed ParameterHandler features from Vaadin 6… That’s was awsome when you could just parse query string to Map.