OK, this won't help much, but... I was having the same problem just
going through some basic tutorial using UiBinder and GWT 2.1.  So, I
redid everything, writing down each step - and, of course, the problem
vanished.

So, there exists the possibility that 2.1 and UiBinder do actually
work together.

I can only offer the truly lame suggestion of restarting Eclipse to
clean up any old invocations of the dev server.

Good luck,
RB

On Nov 3, 8:34 am, pgraham <philip.robert.gra...@gmail.com> wrote:
> Update:
>
> I have commented out all code in the two files listed above so that
> they are as follows:
>
> MainMenu.ui.xml:
>
> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
>     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> </ui:UiBinder>
>
> MainMenu.java:
>
> public class MainMenu extends Composite {
>
>     interface Binder extends UiBinder<Widget, MainMenu> {}
>
>     private static Binder uiBinder = GWT.create(Binder.class);
>
>     public MainMenu() {
>         initWidget(uiBinder.createAndBindUi(this));
>     }
>
> }
>
> When I do this I get the same error so it is not related to the
> content.
>
> At this point I am thinking that there is a version conflict with
> xerces.  Does anyone know if Dev Mode relies on xerces to parse
> *.ui.xml files and if so which version?
>
> NOTE:  I am using the gwt-maven-plugin to compile the app and it works
> fine if I compile it and deploy it in Tomcat
>
> Thanks,
> Philip
>
> On Nov 2, 1:54 pm, pgraham <philip.robert.gra...@gmail.com> wrote:
>
>
>
>
>
>
>
> > MainMenu.ui.xml:
>
> > <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
> >     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> >     <ui:with field="css"
> > type="org.sitebrand.ui.gwt.resources.UiResources.MainMenuCss" />
> >     <ui:with field="lbls"
> > type="org.sitebrand.ui.gwt.resources.MainMenuLbls" />
> >     <ui:with field="debugIds"
> > type="org.sitebrand.gwt.constants.DebugConstants" />
>
> >     <g:MenuBar stylePrimaryName="{css.primary}">
> >         <g:MenuItem ui:field="campaigns"
> > debugId="{debugIds.menuitem_campaigns}" text="{lbls.campaigns}">
> >             <g:MenuBar vertical="true">
> >                 <g:MenuItem ui:field="createCampaign"
> >                     text="{lbls.createCampaign}" />
> >                 <g:MenuItem ui:field="viewCampaigns"
> >                     text="{lbls.viewCampaigns}" />
> >                 <g:MenuItem ui:field="campaignPriority"
> >                     text="{lbls.campaignPriority}" />
> >                 <g:MenuItem ui:field="reports"
> >                     text="{lbls.reports}" />
> >             </g:MenuBar>
> >         </g:MenuItem>
>
> >         <g:MenuItem ui:field="content"
> > debugId="{debugIds.menuitem_content}" text="{lbls.content}">
> >             <g:MenuBar vertical="true">
> >                 <g:MenuItem
> >                     ui:field="createContent"
> >                     text="{lbls.createContent}" />
> >                 <g:MenuItem
> >                     ui:field="viewContent"
> >                     text="{lbls.viewContent}" />
> >                 <g:MenuItem
> >                     ui:field="integrate"
> >                     text="{lbls.integrate}" />
> >             </g:MenuBar>
> >         </g:MenuItem>
>
> >         <g:MenuItem ui:field="segments"
> > debugId="{debugIds.menuitem_segments}" text="{lbls.segments}">
> >             <g:MenuBar vertical="true">
> >                 <g:MenuItem
> >                     ui:field="createSegment"
> >                     text="{lbls.createSegment}" />
> >                 <g:MenuItem
> >                     ui:field="viewSegments"
> >                     text="{lbls.viewSegments}" />
> >             </g:MenuBar>
> >         </g:MenuItem>
>
> >         <g:MenuItem ui:field="layout"
> > debugId="{debugIds.menuitem_layout}" text="{lbls.layout}">
> >             <g:MenuBar vertical="true">
> >                 <g:MenuItem
> >                     ui:field="addTemplate"
> >                     text="{lbls.addTemplate}" />
> >                 <g:MenuItem
> >                     ui:field="viewTemplates"
> >                     text="{lbls.viewTemplates}" />
> >             </g:MenuBar>
> >         </g:MenuItem>
>
> >         <g:MenuItem ui:field="account"
> > debugId="{debugIds.menuitem_account_mgmt}" text="{lbls.account}">
> >             <g:MenuBar vertical="true">
> >                 <g:MenuItem
> >                     ui:field="myAccount"
> >                     text="{lbls.myAccount}" />
> >                 <g:MenuItem
> >                     ui:field="organizations"
> >                     text="{lbls.organizations}" />
> >                 <g:MenuItem
> >                     ui:field="sites"
> >                     text="{lbls.sites}" />
> >                 <g:MenuItem
> >                     ui:field="users"
> >                     text="{lbls.users}" />
> >                 <g:MenuItem
> >                     ui:field="globalSettings"
> >                     text="{lbls.globalSettings}" />
> >             </g:MenuBar>
> >         </g:MenuItem>
>
> >         <g:MenuItem ui:field="help" debugId="{debugIds.menuitem_help}"
> > text="{lbls.help}">
> >             <g:MenuBar vertical="true">
> >                 <g:MenuItem
> >                     ui:field="manual"
> >                     text="{lbls.manual}" />
> >                 <g:MenuItem
> >                     ui:field="support"
> >                     text="{lbls.support}" />
> >             </g:MenuBar>
> >         </g:MenuItem>
> >     </g:MenuBar>
>
> > </ui:UiBinder>
>
> > MainMenu.java:
>
> > public class MainMenu extends Composite {
>
> >     /*
> >      *
> > =========================================================================
> >      * UiBinder
> >      *
> > =========================================================================
> >      */
>
> >     interface Binder extends UiBinder<Widget, MainMenu> {}
>
> >     private static Binder uiBinder = GWT.create(Binder.class);
>
> >     static {
> >         getCss().ensureInjected();
> >     }
>
> >     @UiFactory
> >     public static MainMenuCss getCss() {
> >         return UiResources.INST.mainMenuCss();
> >     }
>
> >     @UiFactory
> >     public static MainMenuLbls getLbls() {
> >         return MainMenuLbls.INST;
> >     }
>
> >     /*
> >      *
> > =========================================================================
> >      * Instance
> >      *
> > =========================================================================
> >      */
>
> >     // Top level menu items
> >     @UiField
> >     MenuItem campaigns, content, segments, layout, account, help;
>
> >     // Campaigns menu items
> >     @UiField
> >     MenuItem createCampaign, viewCampaigns, campaignPriority, reports;
>
> >     // Content menu items
> >     @UiField
> >     MenuItem createContent, viewContent, integrate;
>
> >     // Segments menu items
> >     @UiField
> >     MenuItem createSegment, viewSegments;
>
> >     // Layout menu items
> >     @UiField
> >     MenuItem addTemplate, viewTemplates;
>
> >     // Account menu items
> >     @UiField
> >     MenuItem myAccount, organizations, sites, users, globalSettings;
>
> >     // Help menu items
> >     @UiField
> >     MenuItem manual, support;
>
> >     public MainMenu() {
> >         initWidget(uiBinder.createAndBindUi(this));
>
> >         UserServiceManager.getClientSession(new GotClientSession() {
> >             @Override
> >             public void got(ClientSession session) {
> >                 boolean canEditDomain = session.hasAtLeastPermission(
> >                     PermissionType.EDIT, SecurableComponent.GENERAL);
>
> >                 if (!canEditDomain) {
> >                     createCampaign.setVisible(false);
> >                     campaignPriority.setVisible(false);
>
> >                     createContent.setVisible(false);
>
> >                     segments.setSubMenu(new MenuBar());
> >                     segments.setCommand(viewSegments.getCommand());
>
> >                     layout.setSubMenu(new MenuBar());
> >                     layout.setCommand(viewTemplates.getCommand());
> >                 }
>
> >                 boolean singleItemAccountMenu =
> >                     !session.canAdministerAtLeastOneOrganization() &&
> >                         !session.canAdministerAtLeastOneSite() &&
> >                         !session.isSitebrandAdmin();
> >                 if (singleItemAccountMenu) {
> >                     account.setSubMenu(new MenuBar());
> >                     account.setCommand(myAccount.getCommand());
> >                 } else {
> >                     if (!
> > session.canAdministerAtLeastOneOrganization()) {
> >                         organizations.setVisible(false);
> >                     }
>
> >                     if (!session.canAdministerAtLeastOneSite()) {
> >                         sites.setVisible(false);
> >                     }
>
> >                     boolean showUsers =
> >                         session.canAdministerAtLeastOneOrganization()
> > ||
> >                         session.canAdministerAtLeastOneSite();
> >                     if (!showUsers) {
> >                         users.setVisible(false);
> >                     }
>
> >                     if (!session.isSitebrandAdmin()) {
> >                         globalSettings.setVisible(false);
> >                     }
> >                 }
> >             }
> >         });
>
> >         createCampaign.setCommand(new Command() {
> >             @Override
> >             public void...
>
> read more »

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to