google-code-export / gwt-platform

Automatically exported from code.google.com/p/gwt-platform
1 stars 0 forks source link

gwtp 0.7 could not reveal place if request contains query string parameters #426

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create simple gwtp0.7 application with NameToken on child presenter
2. try and reveal place by passing query string for example 
http://localhost:8080/#main;param=1
3. Removing param works
4. Nothing is shown on the screen
5.Also if you refresh the page containing query string params, that did not 
work either!

What is the expected output? What do you see instead?
overriden prepareFromRequest not invoked. Blank screen shown.

What version of the product are you using? On what operating system?
0.7

Please provide any additional information below.

Original issue reported on code.google.com by email2a...@gmail.com on 14 Jun 2012 at 12:36

GoogleCodeExporter commented 9 years ago
Hi,

I'm not sure how you have coded the string parameter, but did you try the 
following?

In the parent presenter (or other child presenter), when you place the 
revealPlace request:
placeManager.revealPlace(new 
PlaceRequest(NameTokens.<aToken>).with(<paramName>,<paramValue>));

With <paramName> the parameter name and <paramValue> the value of the parameter.
This is how I use a string parameter for a child presenter.

In the prepareFromRequest in the child presenter you can then retrieve the 
parameter value with the following:
placeManager.getCurrentPlaceRequest().getParameter(<paramName>, 
<defaultValueIfParamNotFoundInUrl>);

This works fine with 0.7 for me. 

Original comment by hanknor...@hotmail.com on 29 Jun 2012 at 6:31

GoogleCodeExporter commented 9 years ago
Also If the parsing fail in prepareFromRequest, it will block and nothing will 
be shown, what is in your prepareFromRequest?

Original comment by goudreau...@gmail.com on 9 Jul 2012 at 6:14