Monday, October 30, 2017

Re: Element may only contain a single child element, but found (:3)

When removing all the details of your UiBinder the file looks like:

<!DOCTYPE ui:UiBinder SYSTEM "">
<ui:UiBinder xmlns:ui=""

<ui:with type="com.folder.client.resources.Css" field="CSS" />
<ui:with type="com.folder.client.resources.Strings" field="STRINGS" />

<ui:style type="com.folder.client.presenters.main.common.dialog.HelpDialog.LocalStyle">
    // ....
  // the first root element inside
<g:HTMLPanel ui:field="uiPanelOptions" >


  // the second root element inside
<g:HTMLPanel ui:field="uiPanelFooter">



With UiBinder you can only have a single Widget / Element inside the <ui:UiBinder> tag. You would need to wrap your two HTMLPanels with a third one. The reason is that in your Java code the call to uibinder.createAndBindUi(this) returns this single Widget / Element. So you can not have two root Widgets / Elements.

-- J.

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment