Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread tanteanni
i have one problem with this solution: testability since i generate those links in an activity i want test it without GwtTestCase. But using my AppPlaceHistoryMapper smells like the need for GWTTestCase?! i think i will refactor my code and give the place a string constant (public or with

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread Jens
Oh yes I think you will need a GWTTestCase as the mapper is created with GWT.create(). I did not had that in mind because I have implemented PlaceHistoryMapper myself (nicer url scheme) so there is no need for GWT.create(). -- You received this message because you are subscribed to the

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread Thomas Broyer
Isn't that what mocks are for? -- 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/-/bQ_3M5iyC8MJ. To post to this group, send email to

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread tanteanni
i guess you mean to implement my own PlaceHistoryMapper - only for test? that could work but now i am happy with my getPrefix() in place-class. With this i don't need a dependency to historymapper in my activity. (it don't feels right to use historymapper to get a constant string from a

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread Thomas Broyer
On Wednesday, October 26, 2011 3:51:12 PM UTC+2, tanteanni wrote: i guess you mean to implement my own PlaceHistoryMapper - only for test? that could work Yes, with the added benefit that you could test whether you call the PlaceHistoryMapper with the appropriate argument, not whether the

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread tanteanni
thx! once again i learned a lot :-) -- 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/-/j91qOXlWMjoJ. To post to this group, send email to

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread tanteanni
ok some questions remain: i just implemented my AppHistoryMapper. I need one implementation per place, right? (i guess that is what gwt.create does: generating one mapper per place using the tokenizer code for implementation?) with this mock in place: is the code provided bei jens

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-26 Thread Jens
i guess that is what gwt.create does: generating one mapper per place using the tokenizer code for implementation? Only one mapper is generated. It contains a large generated if-then-else block that delegates getPlace() and getToken() to the correct Tokenizer based on the prefix (use -gen

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-24 Thread Jens
You can use: AppPlaceHistoryMapper mapper = ... //get mapper somehow myHyperLink.setTargetHistoryToken(mapper.getToken(new MyPlace(stateVar1, stateVar2, ...))); -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this

Re: How to get @Prefix value from an Place.Tokenizer? or how to set via clientbundle constants?

2011-10-24 Thread tanteanni
thx! that is exactly what i am looking for. -- 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/-/X-FXQ8uw25gJ. To post to this group, send email to