Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

gwt

uibinder

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?

like image 561
user198313 Avatar asked Feb 13 '10 14:02

user198313


2 Answers

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>
like image 191
Bob Avatar answered Nov 14 '22 06:11

Bob


You can keep using a <div> but just add display: inline to its CSS, which will make it display as though it were a <span>.

Edit: fixed place at the end where I said 'div' but meant 'span'.

like image 5
aem Avatar answered Nov 14 '22 05:11

aem