GWT MVP Roo - Changing Default History Tokens

16 views
Skip to first unread message

zixzigma

unread,
Nov 7, 2010, 10:14:10 PM11/7/10
to Google Web Toolkit

How can we change history tokens in Roo generated app ?
currently it is like this : #ProxyPlace:
1@NO@org.springsource.roo.extrack.client.managed.request.EmployeeProxy!
DETAILS

is it in Tokenizer class ? (Tokenizer inner class inside Place
classes)

is so called REST like URLs possible ? /employees/1

does it mean we have to write custom getPlace, getToken, to convert
tokens to places ?

Thomas Broyer

unread,
Nov 8, 2010, 4:38:59 AM11/8/10
to Google Web Toolkit


On 8 nov, 04:14, zixzigma <zixzi...@gmail.com> wrote:
> How can we change history tokens in Roo generated app ?
> currently it is like this : #ProxyPlace:
> 1@N...@org.springsource.roo.extrack.client.managed.request.EmployeeProxy!
> DETAILS
>
> is it in Tokenizer class ? (Tokenizer inner class inside Place
> classes)

Yes (though it just delegates to the getHistoryToken and getProxyId
methods of RequestFactory)

> is so called REST like URLs possible ? /employees/1

This is no more or less "REST like" than the above (I assure you!);
and yes it's possible (the issues then are to identify objects that
are not yet persisted to the server; and of course mapping the
"employees" to an EntityProxy class, representing the class+id couple
in the Place, and having dedicated "find" methods to retrieve the
object from the server, as without an EntityProxyId you won't be able
to use RequestFactory.find())

> does it mean we have to write custom getPlace, getToken, to convert
> tokens to places ?

Yes.

That or writing your own PlaceHistoryMapper that won't use
PlaceTokenizer's at all (i.e. implement PlaceHistoryMapper in a
concrete class and not use the GWT.create() magic to generate the
implementation).
Reply all
Reply to author
Forward
0 new messages