You have to ask yourself, what exactly is a TabLayoutPanel ?

it has two parts, a header and a body.
the header is a list of labels/links that when clicked change state 
(only one can be active at a time, you change its color, updates the history 
token)

therefore to make TabLayoutPanel work correctly with GWT Activity/Places
and to have LazyLoading, the trick is to Not use TabLayoutPanel,
instead you can simulate it very easily, by using the technique below.

1- develop a custom widget for your TabHeader

This widget just displays a horizontal list of tabs (hyperlinked labels)
you use <g:Label> and  basic <g:HyperLink> to create a tab,
that upon click takes user to a new place (using g:HyperLink)
you manipulate the tabs state by handling Label onClick event
and adding and removing a css class that highlights the active element.

for the GWT MVP side of it:

2- Your GWT MVP, you would have two display regions, MasterDisplayRegion and 
DetailDisplayRegion.
they would have their corresponding ActivityManagers,and ActivityMappers.
(for an example of this please checkout Expenses Application that ships with 
GWT generated by Roo)

now integrate Step 1 and Step 2:

3- Display TabHeader in Master Display Region
   Display whatever you want to put in the body of the TabPanel
   in the Detail Display Region.

you now have a fully working tabbed User Interface,
which supports Lazy Loading, works with Browser History,
and integrates with GWT MVP Activities and Places.

Ryan

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

Reply via email to