Thursday, October 25, 2012

Re: Best practices for building UiBinder based widgets: Composition vs Inheritance vs ...

gwt-platform have a better design for nested Presenters.
That's where nesting presenters becomes handy, because you would create a upper layer presenter that has a content slot from every other presenters to be shown in and only this one would have the header and the footer in it. I always call this presenter : ApplicationPresenter.

You can find an example in here:
http://code.google.com/p/gwt-platform/wiki/GettingStarted?tm=6#Nested_presenters


On Friday, July 22, 2011 3:18:37 PM UTC+1, Alexander Orlov wrote:
On Fri, Jul 22, 2011 at 1:22 PM, Jens <jens.ne...@gmail.com> wrote:
<my:MyPanel>
  <my:header>
     <g:Label>Header</g:Label>
  </my:header>
</my:MyPanel>

Your Java implementation of MyPanel would then contain methods:

@UiChild
public void addHeader(Widget w) {
 //your add logic
}
 
Great, that's basically everything I need!

-Alex

--
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/-/dCc2DZ0jLcIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate