Creating a widget that can accept HTML + Widgets in UiBinder (Without using HTMLPanel)

Skip to first unread message

Ali Akhtar

Mar 24, 2015, 11:55:25 AM3/24/15

I'm trying to create a container widget which can accept html within uibinder files, without extending from HTMLPanel.

If I try to implement `HasHTML`, then I can only pass in HTML without being able to pass any widgets.

If I try to extend from ComplexPanel and override the add(Widget child) method, same as HTMLPanel does, then passing in HTML doesn't work.

Surely UiBinder isn't hard-coded to only allow HtmlPanel to accept panels + widgets? 

I'm trying to reduce the amount of boilerplate needed for displaying a form. (Right now I have to use a FormPanel containing a HtmlPanel which contains the actual form code. I'd like to be able to just use one widget which contains my html embdedded within the formPanel and HtmlPanel)


Mar 24, 2015, 12:11:59 PM3/24/15

Surely UiBinder isn't hard-coded to only allow HtmlPanel to accept panels + widgets? 

HTMLPanel has its own HTMLPanelParser used by UiBinder which makes mixing HTML + Widgets possible, so yes it is kind of hardcoded.

-- J.

Ali Akhtar

Mar 24, 2015, 12:16:43 PM3/24/15
IMO that parser interface should be made external and it should allow any widget that implements this interface to have html within UiBinder. I'm surprised it wasn't done that way to begin with.

You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

Reply all
Reply to author
0 new messages