How to skip history token on place change? (Activies, Places and History management)

42 views
Skip to first unread message

toman

unread,
Jan 7, 2011, 12:02:18 PM1/7/11
to Google Web Toolkit
I may be way off the track here but I have a Place & Activity for
searching items. When an item is clicked, the Place and Activity are
changed to such that allow the editing of an item. What I would like
is that the token of the "edit place" for editing is not added to the
history and the current URL in the browser address bar would stay as
it was in the previous place.

i.e.

- URL is http://.../search#query=...
- The user clicks on an item.
- The URL stays and history is unchanged (currently history is updated
and address becomes http://.../edit...)

Should the search results and editing of an item happen within the
same Place or how I should wrap my head around this? The edit-place
may be navigated to from within other Places than the search as well.

Noobish question I guess but really having trouble figuring this out.

Thomas Broyer

unread,
Jan 7, 2011, 12:29:05 PM1/7/11
to google-we...@googlegroups.com
If the history token doesn't change, then you haven't "navigated" to another place; i.e. IMO you should do it all in the same place and activity (use case looks weird though at first sight :-/ ).
Your "edit screen" can however very be re-used by an activity corresponding to the "edit place" used elsewhere.

toman

unread,
Jan 7, 2011, 12:44:24 PM1/7/11
to Google Web Toolkit
Hi Thomas and thanks for the insight,

Creating a new item consists of searching for some initial, immutable
properties for this item AND editing some mutable properties for it.
Then later, these mutable properties can be changed.

So yeah I guess searching and editing should happen in one place and
editing an item afterwards in another... but I can still use the same
view or ui component for the "editing" part of both.

PS. Thanks for the excellent articles on your blog!

nacho

unread,
Jan 8, 2011, 12:46:22 PM1/8/11
to google-we...@googlegroups.com
If you don't add MyPlace.Tokenizer.class to your AppPlaceHistoryMapper the activity will be fired but the history won't change

Eugen Paraschiv

unread,
Jul 7, 2011, 9:46:47 AM7/7/11
to google-we...@googlegroups.com
I have run into the same issue. It is true the tokenizer is not added to the mapper, than it works, only that means that I'm forced to go with a all or nothing approach. What I would be interested in is to be able to programatically decide when to trigger a history item addition and when not to.
Is this in any way possible?

Reply all
Reply to author
Forward
0 new messages