I have defined a UiBinder widget called Header with HTML markup only in Header.ui.xml Hence its corresponding Header.java class extends UIObject and has setElement(uiBinder.createAndBindUi(this)) in its constructor. This gives out an Element object. When appended to RootPanel.geBodyElement() , It runs fine.
Problem is:
I want to use it in another UiBinder widgets’s declarative ui.xml ( type is Composite with GWT Ui elements in xml) file. When I use the header widget in xml here:
<g:HTMLPanel>
<app:Header />
</g:HTMLPanel>
GWT gives an error: [ERROR] Not allowed in an HTML context Element
Can any one help ?
Because HTMLPanel can only wrap raw HTML or GWT Widgets.