ProxyPlace: converting a token to EntityProxy

2010-11-07 Thread Y2i
I'd like to implement something similar to non-existent ProxyPlace:
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/index.html?com/google/gwt/app/place/ProxyPlace.html

Is there a standard way to convert a token to a sub-class of
EntityProxy in PlaceTokenizerP.getPlace(String token)?
Should I use my own sub-class of AbstractPlaceHistoryMapperF instead
of combination of PlaceTokenizerP and PlaceHistoryMapper?
If AbstractPlaceHistoryMapperF is the best alternative, what would
be the best candidate for a token?  Should it be a string
representation of Entity's ID or something else?

Your thoughts will be greatly appreciated!
Yuri

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: ProxyPlace: converting a token to EntityProxy

2010-11-07 Thread Thomas Broyer


On 7 nov, 18:59, Y2i yur...@gmail.com wrote:
 I'd like to implement something similar to non-existent 
 ProxyPlace:http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/index.html?c...

 Is there a standard way to convert a token to a sub-class of
 EntityProxy in PlaceTokenizerP.getPlace(String token)?

RequestFactory#getProxyId
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/requestfactory/shared/RequestFactory.html#getProxyId(java.lang.String)
(if you used getHistoryToken to generate the token, of course)

 Should I use my own sub-class of AbstractPlaceHistoryMapperF instead
 of combination of PlaceTokenizerP and PlaceHistoryMapper?

No, you have to create a PlaceTokenizer for the ProxyPlace, which
you'll initialize with a RequestFactory instance (which means you have
to use PlaceHistoryMapperWithFactory with a method in your factory
creating the PlaceTokenizer with the RequestFactory)

You can actually find the code for ProxyPlace et al. if you go back in
history in the SVN repository.
(or download GWT 2.1 M3 for example, which contained them)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: ProxyPlace: converting a token to EntityProxy

2010-11-07 Thread Y2i
Thomas,

Thanks a lot for your response, it was very helpful!

Yuri

On Nov 7, 11:57 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 7 nov, 18:59, Y2i yur...@gmail.com wrote:

  I'd like to implement something similar to non-existent 
  ProxyPlace:http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/index.html?c...

  Is there a standard way to convert a token to a sub-class of
  EntityProxy in PlaceTokenizerP.getPlace(String token)?

 RequestFactory#getProxyIdhttp://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...)
 (if you used getHistoryToken to generate the token, of course)

  Should I use my own sub-class of AbstractPlaceHistoryMapperF instead
  of combination of PlaceTokenizerP and PlaceHistoryMapper?

 No, you have to create a PlaceTokenizer for the ProxyPlace, which
 you'll initialize with a RequestFactory instance (which means you have
 to use PlaceHistoryMapperWithFactory with a method in your factory
 creating the PlaceTokenizer with the RequestFactory)

 You can actually find the code for ProxyPlace et al. if you go back in
 history in the SVN repository.
 (or download GWT 2.1 M3 for example, which contained them)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.