Hello,
I couldn't manage to get ui:with working.
[ERROR] [com.myproject] - Unknown tag with, or is not appropriate as a
top level element Element <ui:with field='resource'
type='com.myproject.client.resource.MyResource'>
My ui.xml contents :
<!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:with type='com.myproject.client.resource.MyResource'
field='resource'></ui:with>
<ui:style>
.logo {
padding: 0 0 0 1em;
float:left;
height: 4.3em;
width: 13em;
}
.ss {
float:left;
padding:1.3em 0 0 1em;
text-decoration: underline;
font-weight: bold;
width:40%;
}
.aa{
clear:left;
width:100%;
background-color: #9CABBC;
min-height: 3em;
}
.eastPanel {
background-color: #F60;
}
.westPanel {
background-color: #F6F6F6;
}
.northPanel {
background-color: #F4F7FB;
}
.southPanel {
background-color: #F4F7FB;
}
.centerPanel {
background-color: transparent;
}
</ui:style>
<g:HTMLPanel>
<g:DockLayoutPanel unit='EM' height='100%'>
<g:north size='7'>
<g:FlowPanel styleName='{style.northPanel}'>
<g:Image ui:field='logo' addStyleNames='{style.logo}' />
<g:HTMLPanel styleName='{style.ss}'>Lorem Ipsum</g:HTMLPanel>
<g:FlowPanel styleName='{style.aa}'>
<g:HTMLPanel>
<ul addStyleNames="{resource.style.nav}">
<li> Homepage</li>
<li> Contacts</li>
<li> Help</li>
</ul>
</g:HTMLPanel>
</g:FlowPanel>
</g:FlowPanel>
</g:north>
<g:south size='5'>
<g:FlowPanel styleName='{style.southPanel}'>
<g:Label></g:Label>
</g:FlowPanel>
</g:south>
<g:west size='10'>
<g:FlowPanel styleName='{style.westPanel}'>
<g:Label></g:Label>
</g:FlowPanel>
</g:west>
<g:center>
<g:FlowPanel styleName='{style.centerPanel}' ui:field='center'>
<g:Label></g:Label>
</g:FlowPanel>
</g:center>
</g:DockLayoutPanel>
</g:HTMLPanel>
</ui:UiBinder>
My ClientBundle contents:
public interface MyResource extends ClientBundle {
public interface Style extends CssResource {
String nav();
}
@Source("/css/base.css")
Style style();
@Source("/img/logo.png")
ImageResource logo();
}
And my base.css contents :
.nav {
list-style-type: none;
}
I don't know what i'm missing but those should be enough according to
the documentation and many samples i've examined.
Please someone help me resolve this problem.
Thanks