Manuel45
(Manuel Di Stefano)
April 15, 2013, 6:06pm
1
Hello,
i have a couple of custom class in my application. A custom class extend VerticalLayout and implement View. I call it by http://myapp/#!/customclass .
Now i want get a parameter like httt://myapp/ #!/customclass/?test=hello. I tried implementing Handler Request interface but it didnt work.
In general i cant understand how get a parameter outside my init(VaadinRequest requet) method. Can someone help me plz?
Charles
(Charles Anthony)
April 16, 2013, 7:01am
2
There’s your problem; the an HTTP URI, the request parameters come
before
the URI Fragment. From
Wikipedia article
(easier to understand than the RFC, and the first result on my quick google!)
In other words, your URL should be http://myapp?test=hello#!/customclass
You simply need access to the VaadinRequest object - which you can get via the
VaadinService#getCurrentRequest()
method, e.g.
String value = VaadinService.getCurrentRequest().getParameter("test")
HTH,
Cheers,
Charles.
Manuel45
(Manuel Di Stefano)
April 16, 2013, 12:25pm
3
Tnx Charles,
now it work! And i understand better URI Fragment