How would your PlaceTokenizer populate the EntityProxyId from the 
/employee/777 token? You'd still have to have a findEmployee(Long) method 
(or similar) in one of your RequestContext-s to handle cases where the Place 
has been parsed from the history token (using back/next browser buttons, 
refreshing the whole page, coming from a link or a bookmark), so storing the 
EntityProxyId into the Place doesn't buy you much in the end. I mean, your 
code would probably look like "Request<Employee> req = (place.record != 
null) ? rf.find(Place.record) : 
rf.employeeContext().findEmployee(place.prettyId)" and I bet you'd soon 
change it to just "Request<employee> req = 
rf.employeeContext().findEmployee(place.prettyId)" because it works just as 
well.

RequestFactory's getHistoryToken/getProxyId are for cases where you don't 
want a specific history token "look and feel" *or* you want to be able to go 
back to the edit screen for a proxy created on the client side (it doesn't 
yet have a "prettyId", so you could use its stableId); but that wouldn't 
play well with bookmarking (AFAICT), so I'd just go with a 
"/employee/create" token (and it creates a new proxy each time you hit it).

-- 
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-toolkit@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.

Reply via email to