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

37 views
Skip to first unread message

Ali Akhtar

unread,
Mar 24, 2015, 11:55:25 AM3/24/15
to google-we...@googlegroups.com
Hi,

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)

Jens

unread,
Mar 24, 2015, 12:11:59 PM3/24/15
to google-we...@googlegroups.com

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

unread,
Mar 24, 2015, 12:16:43 PM3/24/15
to google-we...@googlegroups.com
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 https://groups.google.com/d/topic/google-web-toolkit/4DFGQF3oIYg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages