Hm I have tried it now and at least the activity does not get restarted. But 
now if I bookmark my selected employee and access it later it can not be 
reselected because the activity filter always sets the employee id to null. 
The filter can not distinguish if the app is running and the user just 
selects/switches between employees or if the app has just been started via a 
bookmark and the employee id should not be nullified. So I have to make the 
filter a lot smarter. Just using placeController.getWhere() does not work as 
it already returns the new place so I can not make any decisions based on 
the old place. Of course I could set a flag in the place and let the 
activity control if the place should be filtered or not by setting the flag 
to true, but I think such a flag is not really an information that should go 
into a place as it does not really belong to the current app state. 

But I think its the only solution, isn't it? 

I am really confused why I have these "complications". Implementing places 
was really nice but now with "one shot activities" it somehow gets more 
difficult like I would expect. Currently it somehow feels easier to have 
singleton activities and then deal with activity updates when a new place 
has been set. Well but I favor a non singleton approach as I do not like to 
store singleton instances that I do not need.

How do you handle these place changes where the place actually keeps the 
same but the state changes? Do you really make the filter smarter so it can 
decide if it should nullify states to make places comparable or do you just 
live with it and create new activities and reload the data (possible via a 
cache, something simple like a static variable in the activity) each time 
they start? 

Am I somehow in a special situation because I do not have separate 
xyzListPlace/xyzDetailPlace classes along with two display areas/activity 
mappers and xyzListActivity/xyzDetailActivity like any other example I have 
seen so far? On a first thought I assume it wouldn't make a difference...?!

-- J.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/pAHIXOoO3PYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to