Re: Any good solution to handle switching among items of a list in 2.1.1 MVP framework?

2011-01-12 Thread Alex Luya
1,for #2,I think all item will correspond to same place,these items are distinguished by model,but how can I get different models from same place? for#1 I don't know what you mean? And as a suggestion,I think if parameterizing the Place(PlaceT) and modifying Activity.start(AcceptsOneWidget

Re: Any good solution to handle switching among items of a list in 2.1.1 MVP framework?

2011-01-12 Thread Y2i
For #2 (List items): There will be a single Place sub-class (let's call it ItemPlace), but every time you click on a list item, a new instance of the ItemPlace is created, and you can pass your item (the model element) to the ItemPlace constructor. (You need to proper implement

Re: Any good solution to handle switching among items of a list in 2.1.1 MVP framework?

2011-01-12 Thread Alex Luya
subclassing is good and OO,but tedious,since tabIndex and id(model) can be used to identify each item and tab index ,why not just use parameterization mechanism to solve this problem.it is simple and concise.but due to history token can only be string,both Two(subclassing and parameterization)

Re: Any good solution to handle switching among items of a list in 2.1.1 MVP framework?

2011-01-12 Thread Y2i
Regarding token parsing: RequestFactory supports converting between history tokens and Entity Types / IDs. http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/requestfactory/shared/RequestFactory.html#getHistoryToken(java.lang.Class)

Any good solution to handle switching among items of a list in 2.1.1 MVP framework?

2011-01-11 Thread Alex Luya
for example: 1,switch among different tabs in tab panel,should I creates cactivities for every tab? 2,switch among different item in a list.such as view different thread in this group? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post

Re: Any good solution to handle switching among items of a list in 2.1.1 MVP framework?

2011-01-11 Thread Y2i
#2 is a classic example of where MVP suits well. You can just follow these guidelines: http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html For #1 it's better to use TabBar (instead of TabPanel/TabLayoutPanel) and handle selection events to navigate to different

Re: Any good solution to handle switching among items of a list in 2.1.1 MVP framework?

2011-01-11 Thread Y2i
Sorry, I meant to say #1 to #2 On Jan 11, 10:08 pm, Y2i yur...@gmail.com wrote: #2 is a classic example of where MVP suits well.  You can just follow these guidelines:http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd... For #1 it's better to use TabBar (instead of