neo09 / gwt-platform

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

Resetting state when passing form a child place to a parent place. #177

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Latest fixes gave us a nicely convenient way of transforming a parent into a 
parent that is also a place. That wasn't possible before since it was messing 
history.

That fixe is really helpful, but a parent place will keep his state and will 
show himself with all his child. That's a cool for some cases, but what if we 
want to reset that state ?

We can't do that in onReveal, but onReveal isn't called when a presenter is 
already shown and onReset is always called.

We could use onFocus to do this job. This issue is closely related to issue 169.

Original issue reported on code.google.com by goudreau...@gmail.com on 25 Aug 2010 at 3:40

GoogleCodeExporter commented 9 years ago
You mean we can give name tokens to parent? I have never tested this and think 
that, if it's really a feature we want to support, then we should have a sample 
with it. (If only to make sure we don't break anything.)

Original comment by philippe.beaudoin on 25 Aug 2010 at 4:30

GoogleCodeExporter commented 9 years ago
Yes we can, now at least. It's not a matter, it doesn't brake anything, we 
weren't able to do it before because we didn't did thing right. While fixing 
issue 160, I found a major bug that was preventing that kind of behavior and 
also other related problems like explaned in issue 160.

I have test it and it works really fine, it only shows the presenter without 
anything in his slot. Only problem is that we can't re init the presenter like 
I said. Well not entirely true, works fine within onReaveal() clearSlot(slot). 
But when you press back button form a child to it's parent, it doesn't do 
anything since it's like changing. When we'll work on issue 169, on focus will 
give us a way to re init it if that's what we want. Else, a parent will show 
himself with all his children, something that I appreciate from times to times, 
but not always.

The only remaining question from my point of view is: since the place that will 
be shown is #main, is this the expected behavior to have also his child ?

I think yes, but some people may disagree.

Original comment by goudreau...@gmail.com on 25 Aug 2010 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by goudreau...@gmail.com on 31 Aug 2010 at 6:58

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 22 Sep 2010 at 1:35

GoogleCodeExporter commented 9 years ago
Bumping to 0.6, preparing release 0.5.

Original comment by philippe.beaudoin on 25 Jan 2011 at 6:33

GoogleCodeExporter commented 9 years ago
We need unit tests for named parent presenter, or at least we need to exercise 
them in a sample. Until we do this, I wouldn't advertise this as a feature of 
GWTP. That is: an untested feature is not a feature. :)

Original comment by philippe.beaudoin on 17 May 2011 at 2:06

GoogleCodeExporter commented 9 years ago
Not only untested, I don't even think it's working anymore.

Original comment by goudreau...@gmail.com on 17 May 2011 at 2:22

GoogleCodeExporter commented 9 years ago
Bumping to 0.7, preparing release 0.6.

Original comment by philippe.beaudoin on 6 Jun 2011 at 8:17

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 1 Feb 2012 at 6:52