1

you can use the bootstrap configurator (http://getbootstrap.com/customize/) to configure your own bootstrap version (e.g. set the variables like @grid-float-breakpoint to configure the navbar collapse point). I want to use this feature within my project which is based on gwt using https://github.com/gwtbootstrap3/gwtbootstrap3based.

I managed to create my download my configured bootstrap.zip using the method above.

The zip contains (as expected):

  • \bootstrap\js
  • \bootstrap\css
  • \bootstrap\fonts

just as GWTBootstrap3 project

  • gwtbootstrap3-0.9.3\org\gwtbootstrap3\client\resource\js
  • gwtbootstrap3-0.9.3\org\gwtbootstrap3\client\resource\css
  • gwtbootstrap3-0.9.3\org\gwtbootstrap3\client\resource\fonts

So I tried to replace the bootstrap files out of css with the genereated bootstrap files.

But then I recognized that in the GWTBootstrap3 project there are files named *.cache.min. How / when are these files generated? This is explained already here: GWT Caching Concept

So obviously we want to replace the bootstrap files to remain "cache"d.

Can you please forward me a step-by-step description of how to use bootstrap configurator along with the current GWTBootstrap3 project , i.e. what files need to be replaced?

What I already tried (with no success):

0.) Create a bootstrap.zip with the online configurator and download it

1.) Rename gwtbootstrap3-0.9.3.jar to gwtbootstrap3-0.9.3.zip

2.) Extract

3.) Replace bootstrap-3.3.6.min.cache.css with bootstrap.min.css (from the configurator) and replacing meaning the bootstrap.min.css is renamed to bootstrap-3.3.6.min.cache.css

4.) Put all files from bootstrap.zip into the respective directory and renaming it accordingly as explained in 3.) to effectively replacing the original file

5.) zip and rename it again to gwtbootstrap3-0.9.3.jar

6.) replace the lib in my project

But after doing so I continuously get the compiler errors: Package org.gwtbootstrap3.client.ui cannot be found.

Any help greatly appreciated

Best regards Hannes

Community
  • 1
  • 1
HHeckner
  • 4,722
  • 4
  • 23
  • 33

1 Answers1

1

I can provide an answer which should work for most of the configuration changes. First of all I had to learn that renaming gwtbootstrap3-0.9.3.jar to gwtbootstrap3-0.9.3.zip then unzip, rezip and rename to jar does NOT WORK!!!

So here is a step by step tutorial of how to configure your bootstrap and use it with gwtbootstrap3.0.9.3 . I am not sure this will work for future editions but it should work for bootstrap3.

  • Configure and download your new bootstrap https://github.com/gwtbootstrap3/gwtbootstrap3based.

  • Unzip your new bootstrap, this will provide the subdirectories css, fonts and js. So you will have something like bootstrap/css etc.

  • Now copy your "old" gwtboostrap3.0.9.3 jar to the base directory, so that the bootstrap.zip and the jar lie in the same directory.

  • From the commandline issue jar xf gwtbootstrap3.0.9.3.jar which will create the 2 directories META-INF and org in your directory

  • Move into org\gwtbootstrap3\client\resource\css

  • Copy the FILENAME (not the file!!!). In my gwtbootstrap version the file is called "bootstrap-3.3.6.min.cache.css".

  • Rename the file bootstrap/css/bootstrap.min.css to bootstrap/css/bootstrap-3.3.6.min.cache.css and REPLACE org\gwtbootstrap3\client\resource\css\bootstrap-3.3.6.min.cache.css with bootstrap/css/bootstrap-3.3.6.min.cache.css

  • Rename the file bootstrap\css\boostrap-theme.min.css to boostrap\css\bootstrap-theme-3.3.6.min.cache.css and REPLACE org\gwtbootstrap3\client\resource\css\bootstrap-theme-3.3.6.min.cache.css with bootstrap\css\bootstrap-theme-3.3.6.min.cache.css

  • I left out the fonts directory because my changes did not change anything with the fonts

  • Rename bootstrap\js\bootstrap.min.js to bootstrap\js\bootstrap-3.3.6.min.cache.js and REPLACE org\gwtbootstrap3\client\resource\js\bootstrap-3.3.6.min.cache.js with bootstrap\js\bootstrap-3.3.6.min.cache.js

  • In the basedirectory (where the bootstrap directory lies) issue from the commandline: "jar xf gwtbootstrap3.0.9.3.jar META-INF org". This should produce your new gwtbootstrap3.0.9.3.jar lib

  • In your project replace the old gwtbootstrap3.0.9.3.jar with the new lib.

In case you get lots of java errors telling you it cannot find the classes you mixed up the paths. Please let me know if this worked out for your. Perhaps someone can provide a shellscript to automate the whole process.

One tip: Customizing your bootstrap gives you more control, e.g. for handling the point at which the navbar becomes uncollapsed (at the configuration page look for the key called "@grid-float-breakpoint"). Don't forget to enter a value suitable for you (mine was 800px). Don't forget to add px at the end!!

HHeckner
  • 4,722
  • 4
  • 23
  • 33