I know this problem was reported over a year ago, but I've just seen it, 
and have managed to diagnose what was causing it in my situation.

I've seen this problem when running GWT from Eclipse when my OS's locale is 
set to Turkey. (I believe it is caused by an incorrect case-insensitive 
compare in the parsing code somewhere.)

The workaround is to spell the element as ui:WITH, e.g.:
<ui:WITH type='com.myproject.client.resource.MyResource' field='resource' 
/> 

I hope this helps anyone else who runs into this problem.
Martin

On Saturday, 8 October 2011 23:57:02 UTC+1, oerten25 wrote:
>
> 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 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5ejxDoUDuMwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to