-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap3: Fails to load with out webjars when using a theme #344
Comments
Try to add WicketWebjars.install(this) as first line in your configureBootstrap() method |
I can't use WicketWebjars due to incompatability with JBoss AS 7.1. Thanks for trying to help. |
bootswatch is based on webjars, but you can use the cdn resources instead (since 0.9.3-SNAPSHOT): /**
* configures wicket-bootstrap and installs the settings.
*/
private void configureBootstrap() {
final BootstrapSettings settings = new BootstrapSettings();
settings.useCdnResources(true);
final ThemeProvider themeProvider = new BootswatchThemeProvider(settings) {{
defaultTheme("spacelab");
}};
settings.setThemeProvider(themeProvider);
Bootstrap.install(this, settings);
BootstrapLess.install(this);
} |
@l0rdn1kk0n This works if set theme as above with the new changes authored this morning. However if no theme is specified it fails to add css #345. |
@l0rdn1kk0n After this mornings change I change the code to the following:
I now get a NPE at at de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchTheme.getVersion(BootswatchTheme.java:78) |
I've improved it a bit with 463d027. |
@martin-g Thanks this removes the NPE. The application loads but I get not theme css added. However I do get |
Put a breakpoint at de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchTheme#renderHead and see what happens. |
@martin-g Thanks for pointer. Debugging showed that at line 53 the CssHeaderItem was being created correctly but not added to the response I have fixed this locally by changing line 53 to the following:
I will commit changes and create a PR in the morning. Thanks |
I've committed the fix. |
Thanks On 26 March 2014 07:21, Martin Grigorov [email protected] wrote:
|
When using a theme wicket-bootstrap fails to load properly. Themes should use the CDN as well.
Produces the following error:
The text was updated successfully, but these errors were encountered: