First: <left> and <right> must be in the same namespace as LeftRightToolbar , so it should be <my:left> and <my:right> .
Secondly, you need to annotate two methods in LeftRightToolbar using the @UiChild annotation:
@UiChild(tagname = "left") void addToLeft(Widget widget) { left.add(widget); } @UiChild(tagname = "right") void addToRight(Widget widget) { right.add(widget); }
To add the widget specified in the <my:left> tags, the addToLeft method is addToLeft . The <my:right> processed by addToRight .
If you need to add multiple widgets to your custom tags, you must place a container in them, such as FlowPanel .
Igor Klimer
source share