If you have a custom widget, e.g. "MyPanel", you can do something like the 
following in any other *.ui.xml file:

<my:MyPanel>
  <my:header>
     <g:Label>Header</g:Label>
  </my:header>

  <my:footer>
    <g:Label>Footer</g:Label>
  </my:footer>
</my:MyPanel>

Your Java implementation of MyPanel would then contain methods:

@UiChild
public void addHeader(Widget w) {
 //your add logic
}

@UiChild
public void addFooter(Widget w) {
  //your add logic
}

Its up to you how you add the widgets to MyPanel and of course you could 
simply do an instanceof check if you want to add things differently based on 
the widget that should be added.

-- J.

-- 
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/-/R15ItmIegagJ.
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