Re: GWT 2.1 hellomvp using GIN

2011-01-31 Thread VA
This works absolutly fine for single display view. How can I use this for a multi displau view? Thanks. -- 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

Re: GWT 2.1 hellomvp using GIN

2010-12-23 Thread Frank Bølviken
Hi, Have you written any tests for this? Im curious about the testing abilities of a GWT app which uses GIN etc using EasyMock or Mockito or something. I've been told that it's very easy to test with Junit tests.. is this the case? Do you have any examples? Thanks in advance, Frank B On Oct 24,

Re: GWT 2.1 hellomvp using GIN

2010-11-16 Thread zixzigma
in the following code fragment posted: @Override public Activity getActivity(Place place) { if (place instanceof HelloPlace) { return injector.getHelloActivity().withPlace((HelloPlace) injector.getHelloActivity().withPlace((HelloPlace) could you please explain

Re: GWT 2.1 hellomvp using GIN

2010-11-16 Thread zixzigma
gives you the Activity* -- 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

Re: GWT 2.1 hellomvp using GIN

2010-10-24 Thread Amir Kashani
Moe, Are you using PlaceHistoryMapperWithFactory? If so, my best guess is that you're forgetting to call setFactory in your onModuleLoad(): AppPlaceHistoryMapper historyMapper = GWT.create(AppPlaceHistoryMapper.class); historyMapper.setFactory(ginjector.getAppPlaceFactory()); If that's not

Re: GWT 2.1 hellomvp using GIN

2010-10-24 Thread moejo
Hi Amir, Yes, your absolutely right - forgot to call setFactory! Now everything is working stunningly. I've put together a sample bit of code using the Contact Details code I mentioned previously and it can be downloaded at:

Re: GWT 2.1 hellomvp using GIN

2010-10-24 Thread moejo
By the way, something I realised that although we can't map a 1-Many relationship between a Place and an Activity, you can in fact map multiple places to the same activity and differentiate between the place with multiple init() methods in the activity. On Oct 24, 1:56 pm, moejo

Re: GWT 2.1 hellomvp using GIN

2010-10-23 Thread moejo
Hi All, I'm working on getting an example together and I am having issues setting up the injectors for the code you've suggested above (Amir, david, Aodhagán). So far, I've setup everything as you've suggested for the AppActivityMapper, AppPlaceFactory, AppPlaceHistoryMapper, Places and

Re: GWT 2.1 hellomvp using GIN

2010-10-23 Thread moejo
Sorry, feel like I might be missing some info to you. I've basically got two items: 3 Places - ContactPlace - EditContactPlace - NewContactPlace which map to 2 activities: - ContactActivity - EditContactActivity the contact activity is initally loading fine, but there is a click to add a new

Re: GWT 2.1 hellomvp using GIN

2010-10-23 Thread Henrik Schmidt
I've been playing around with this for som time. I can't see a more reasonable solution than the one Amir and Aigeec proposed. Sure, the getActivity method with a long list of if-the-else's doesn't seem nice, but this alternative is just too much boilerplate for my liking. Lots of Provider

Re: GWT 2.1 hellomvp using GIN

2010-10-23 Thread Henrik Schmidt
Oops. Substitute MailGinjector with AppGinjector. I'm playing around with the Mail sample code. -- 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

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread Thomas Broyer
On 21 oct, 21:15, David Chandler drfibona...@google.com wrote: Hi Yuan, Unfortunately, the mere mention of a need for something does not imply its current availability :-) I wrote the Activities and Places doc and really should have left GIN out of it for the time being. The root issue is

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread Aigeec
Hey Amir, That is pretty much where I got to. I don't use a clientfactory and have replaced it with GIN injection. I don't use a Factory to create the Activity as I have implemented my ActivityPlace slightly differently. Let me know if I have gone completely crazy or have missed some fundamental

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread David Chandler
Thanks for sharing your code, Amir. It's great to see this fleshed out. One possible simplification is to eliminate PlaceTokenizers entirely. These are required by the generated PlaceHistoryMapper, but you are free to create your own implementation of PlaceHistoryMapper which does not use

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread David Chandler
Thanks for sharing your code also, Aodhagán. As both you and Amir have pointed out, there is not necessarily a 1:1 correspondence between Activity and Place, so the notion of an ActivityPlace may not fit every situation. Where I do have an issue now though is actually going to a new Place?

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread Richard Allen
How would you all envision code splitting working with these examples? For example, if you want to code split an activity and view, and then restrict access to that code with a permission check. I would like to be able to split out code that the user does not have permission to use so they don't

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread Amir Kashani
Injecting a ProviderGoodbyePlace into your certainly works. We opted to repurpose the AppPlaceFactory for this, however. In addition to the required methods returning the tokenizer, we have convenience methods to get a new place: GoodbyePlace.Tokenizer getGoodbyeTokenzer() { ... }

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread Amir Kashani
Thanks, I hadn't thought of that. The way we're minimizing code right now, is by creating some useful abstract tokenizers that handle the common use cases (no parameter tokenizer, key-value pair tokenizer). With those there are corresponding abstract tokenizers that handle creating the hashCode

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread David Chandler
Hi Richard, We're still working on an official story for how best to use runAsync with Activities and Places. In the mean time, feedback on your experiences is welcome. GWT's AsyncProxy class or the AsyncProvider in GIN trunk look promising as ways to wrap Activity creation with a runAsync()

Re: GWT 2.1 hellomvp using GIN

2010-10-22 Thread Thomas Broyer
On 22 oct, 19:50, David Chandler drfibona...@google.com wrote: Hi Richard, We're still working on an official story for how best to use runAsync with Activities and Places. In the mean time, feedback on your experiences is welcome. GWT's AsyncProxy class or the AsyncProvider in GIN trunk

Re: GWT 2.1 hellomvp using GIN

2010-10-21 Thread Sebastian Beigel
Thank you Thomas, that's what I was thinking -- and I'm playing with a custom code generator already :) Just wondering what they mean with the GIN comments in the doc/code... In my pre-2.1 homegrown framework I use a code-generated presenter config based on a Ginjector (declaring all the

Re: GWT 2.1 hellomvp using GIN

2010-10-21 Thread Richard Allen
There is another thread on the GWT contributors group about this topic. http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/732e66a858a8ef0b/38a3f36ffc1767a0 -Richard On Oct 21, 5:59 am, Sebastian Beigel sebast...@beigel.de wrote: Thank you Thomas, that's what

Re: GWT 2.1 hellomvp using GIN

2010-10-21 Thread Yuan
can't use gin at ActivityMapper? somehower, on the HelloMVP AppActivityMapper, it says public Activity getActivity(Place place) { // This is begging for GIN if (place instanceof HelloPlace) return new HelloActivity((HelloPlace)

Re: GWT 2.1 hellomvp using GIN

2010-10-21 Thread David Chandler
Hi Yuan, Unfortunately, the mere mention of a need for something does not imply its current availability :-) I wrote the Activities and Places doc and really should have left GIN out of it for the time being. The root issue is that GIN does not have a way to createMeA(Foo.class), as such a method

Re: GWT 2.1 hellomvp using GIN

2010-10-21 Thread Amir Kashani
I work with Tolga, who started the thread on GWTC. Here's the solution we came up with based on David's initial suggestion there. 1) We created a base class called ActivityPlace, that has an abstract getActivty() method: public Activity getActivity(); 2) Thus, the the getActivity method in

GWT 2.1 hellomvp using GIN

2010-10-20 Thread Sebastian Beigel
Hi, I'm looking at 2.1 (RC1) for the first time right now and I try to refactor the hellomvp sample to use GIN. Unfortunately, I have some problems with the places - activities mapping. The doc says A better way to implement the chain of nested ifs would be with a GIN module. and the code is

Re: GWT 2.1 hellomvp using GIN

2010-10-20 Thread Marcin Misiewicz
Well I'm also very interested in some guidelines of how to use gin with activities and places. On Oct 20, 11:42 am, Sebastian Beigel sebast...@beigel.de wrote: Hi, I'm looking at 2.1 (RC1) for the first time right now and I try to refactor the hellomvp sample to use GIN. Unfortunately, I

Re: GWT 2.1 hellomvp using GIN

2010-10-20 Thread Fernando Barbat
I had the exactly same doubt. And I thought about it, but couldn't find out how you can do that mapping with GIN. In fact, Roo's generated projects don't use a GIN-based mapping although they use GIN in other parts. So I'm interested to know the answer to this question too. :P On 20 oct, 07:42,

Re: GWT 2.1 hellomvp using GIN

2010-10-20 Thread moejo
I don't know if this will help, but i recreated the Contact Details app which is under the Large scale application development article at http://code.google.com/webtoolkit/articles/mvp-architecture.html using just a clientFactory to allow a more thorough working example using GWT 2.1 Activities

Re: GWT 2.1 hellomvp using GIN

2010-10-20 Thread Thomas Broyer
On 20 oct, 11:42, Sebastian Beigel sebast...@beigel.de wrote: Hi, I'm looking at 2.1 (RC1) for the first time right now and I try to refactor the hellomvp sample to use GIN. Unfortunately, I have some problems with the places - activities mapping. The doc says A better way to implement the