Trying to get UIBinder to give me a span not a div

user198313 picture user198313 · Feb 13, 2010 · Viewed 8.6k times · Source

I am building a widget with UiBinder, and I need to have it enclosed in a <span /> but UiBinder only gives me <div />. E.g. <g:HTMLPanel /> => <div />. HorizonPanel, FlowPanel, VerticalPanel also give out only <div />.

Does any one know a solution?

Answer

Bob picture Bob · May 27, 2010

Try this:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
         xmlns:g='urn:import:com.google.gwt.user.client.ui'>
    <g:HTMLPanel tag="span">
        <!-- your stuff -->
    </g:HTMLPanel>
</ui:UiBinder>