Using GWT 2.3 I want to be able to specify a custom header for my StackLayoutPanel.
I can do this programmatically by calling StackLayoutPanels
public void add(final Widget widget, Widget header, double headerSize);
method, but when I try and do it from UiBinder using the following code
<g:FlowPanel addStyleNames="{style.widget}">
<g:StackLayoutPanel unit='EM' addStyleNames="{style.inner}">
<g:stack>
<g:header size='3'>
<c:NavigatorHeader title="People"/>
</g:header>
<g:VerticalPanel>
<g:Label>tom</g:Label>
<g:Label>dick</g:Label>
<g:Label>harry</g:Label>
</g:VerticalPanel>
</g:stack>
<g:stack>
<g:header size='3'>
<c:NavigatorHeader title="Cars"/>
</g:header>
<g:VerticalPanel>
<g:Label>estate</g:Label>
<g:Label>saloon</g:Label>
<g:Label>hatchback</g:Label>
</g:VerticalPanel>
</g:stack>
</g:StackLayoutPanel>
</g:FlowPanel>
I get a
Found widget in an HTML context Element <c:NavigatorHeader title='People'>
exception.
How do I do this or is this not supported from UiBinder?
Doh – found it.
Looking in the StackLayoutPanel UiBinder documentation found I just need to use the element g:customHeader in place of g:header.