to my UIBinder file and this to my UIBinder file and this to my UIBinder file and this

How to import Gwt-Bootstrap?

253 views Asked by At

I will use Gwt-Bootstrap in my UiBinder files. I imported this

xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">

to my UIBinder file and this

<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link rel="stylesheet" href="{your module name}/css/font-awesome-ie7.css">

to my Html file. But it doesnt work. The Error is

Package com.github.gwtbootstrap.client.ui cannot be 
 resolved
1

There are 1 answers

3
DarkScrolls On

GWT-Bootstrap must be added to the GWT project. If you are using Maven, add the respective dependency:

<dependency>
  <groupId>com.github.gwtbootstrap</groupId>
  <artifactId>gwt-bootstrap</artifactId>
  <version>2.3.2.1-SNAPSHOT</version>
</dependency>

Then, inherit the GWT-Bootstrap module in your GWT module (< YourProject >.gwt.xml):

<module>
    <inherits name='com.github.gwtbootstrap.Bootstrap' />
    ...
</module>

However, please notice that GWT-Bootstrap is outdated and no longer maintained. I use Bootstrap and GWT on many projects and I believe the best way to use it together is using HTML and Bootstrap standards and binding the HTML elements with Elemental2 to GWT. It works great, there are no limitations and it is future-proof.