GWT styles not applying
- by sernaferna
I'm creating a GWT application that uses UiBinder, and I've come across a bizarre problem where styles aren't applying to my elements--until I refresh the browser, and then the styles briefly get applied, in that fraction of a second before the page refreshes. In other words:
Open page; none of my defined styles are used.
Hit Refresh
For a fraction of a second the styles are used, before the page goes blank
The page reloads, without the styles again
I'm going to include my entire *ui.xml file, because it's not too big.
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:style>
.idLabelStyle {
font-weight: bold;
text-align: center;
width: 100px;
border-style: solid;
border-width: 1px;
margin-right: 5px;
}
.nameLabelStyle {
font-weight: bold;
text-align: center;
width: 500px;
border-style: solid;
border-width: 1px;
margin-right: 5px;
}
.addressLabelStyle {
font-weight: bold;
text-align: center;
width: 500px;
border-style: solid;
border-width: 1px;
}
</ui:style>
<g:HTMLPanel>
<g:HorizontalPanel>
<g:Label addStyleNames="{style.idLabelStyle}">ID</g:Label>
<g:Label addStyleNames="{style.nameLabelStyle}">Name</g:Label>
<g:Label addStyleNames="{style.addressLabelStyle}">Address</g:Label>
</g:HorizontalPanel>
</g:HTMLPanel>
</ui:UiBinder>
I really hope I'm missing something simple.