Re: Header + Footer with GWT 2.1 MVP

2010-12-18 Thread Matthew Hill
Thomas, now my only problem is that the header refreshes on every single placechange. As it may contain data which only needs to be loaded once for a given session, this seems wasteful. See: https://groups.google.com/forum/#!topic/google-web-toolkit/zYBLljOZjS4 -- You received this message

Header + Footer with GWT 2.1 MVP

2010-12-17 Thread Matthew Hill
Hi. How would I make a root widget (or presenter?), which contains anything which should be on every page, e.g. a header and footer. I'm using the MVP features of GWT 2.1. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread David Chandler
Hi Matthew, The easiest way is to put header and footer divs in your HTML host page. If you need to update the content dynamically, you can call Document.get().getElementById(div_id).setInnerHTML() to change the contents in the div. Or you can use DockLayoutPanel and attach sub-panels for the

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread Matthew Hill
Thank you for your answer. I'm not sure that putting it in the host page is a good idea for my app -- I'd rather use that as a last resort. My current onModuleLoad override method in my Entry Point is this: private SimplePanel appWidget = new SimplePanel(); public void

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread David Chandler
Do your header and footer actually need to be Activities? If not, I think it would be easier to set up a DockLayoutPanel as your main widget and create ActivityManagers only for those regions that need them. This thread might give you some ideas:

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread Thomas Broyer
No, you don't have to subclass SimplePanel. Just use a DockLayoutPanel (or whatever), that you'll add to the RootLayoutPanel, but put the SimplePanel *within* that DockLayoutPanel. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread Matthew Hill
Hi. I thought I'd play with having multiple ActivityMappers. Here's what I've got so far: @Override public void onModuleLoad() { DockLayoutPanel containerWidget = new DockLayoutPanel(Unit.PX); SimplePanel headerWidget = new SimplePanel(); SimplePanel mainWidget = new SimplePanel();

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread Thomas Broyer
A Place is equivalent to a URL, this is where you are, and is global to your application. Instead of having multiple places at once, you instead have ActivityMapper that react differently to the same place. In your case, for the default place, your HeaderActivityMapper would return the

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread Matthew Hill
Sorry, I was confused because David C. said this in the thread which he linked to: In this design, the WestActivity could call placeController.goTo(detailPlace), where DetailPlace is mapped only in the EastActivityMapper so the westPanel won't change. When I read that, I think that what I

Re: Header + Footer with GWT 2.1 MVP

2010-12-17 Thread Matthew Hill
Thanks for your blog post on working around the lack of true nesting -- very useful. I've got it working now. -- 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