GWT-bootstrap Deferred binding failed

731 views Asked by At
  1. Where to download a GWT-bootstrap.jar latest stable version?

  2. I downloaded from here a copy of gwt-bootstrap 2.3.2.jar. and create a sample project but each time I get following error.

    Compiling module com.test.Bootstrap
    Scanning for additional dependencies:               file:/F:/desk/bootstrap/src/com/test/client/Testing.java
      Computing all possible rebind results for 'com.test.client.Testing.TestingUiBinder'
     Rebinding com.test.client.Testing.TestingUiBinder
        Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
           [ERROR] <b:Heading> missing required attribute(s): size Element <b:Heading> (:4)
       [ERROR] Errors in 'file:/F:/desk/bootstrap/src/com/test/client/Testing.java'
      [ERROR] Line 11:  Failed to resolve 'com.test.client.Testing.TestingUiBinder' via deferred binding
       Scanning for additional dependencies: jar:file:/F:/technology/lib/gwt-2.4.0/gwt-2.4.0/gwt-user.jar!/com/google/gwt/user/client/ui/Composite.java
          [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
     [WARN] com.test.client.Testing_TestingUiBinderImpl
       [ERROR] Cannot proceed due to previous errors
    

My code is as bellow BootStrap.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='bootstrap'>
  <inherits name='com.google.gwt.user.User'/>
  <inherits name='com.google.gwt.user.theme.standard.Standard'/>
  <inherits name="com.github.gwtbootstrap.Bootstrap"/>
  <entry-point class='com.test.client.Bootstrap'/>
  <set-property name="bootstrap.responsiveDesign" value="true"/>
  <source path='client'/>
  <source path='shared'/>
</module>

Testing.ui.xml

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
    xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
<g:HTMLPanel>
    <b:Heading>Hello bootstrap</b:Heading>
    <b:FluidContainer>
    <b:FluidRow>
        <b:Column size="4">...</b:Column>
        <b:Column size="8">...</b:Column>
    </b:FluidRow>
    </b:FluidContainer>
</g:HTMLPanel>
</ui:UiBinder> 

Testing.java

public class Testing extends Composite {

    private static TestingUiBinder uiBinder = GWT.create(TestingUiBinder.class);

    @UiTemplate("Testing.ui.xml")
    interface TestingUiBinder extends UiBinder<Widget, Testing>{

    }

    public Testing() {
        initWidget(uiBinder.createAndBindUi(this));
    }

}
1

There are 1 answers

0
Olivier Tonglet On

Looks like the size attribute is mandatory. Try this in Testing.ui.xml

<b:Heading size="2">