本文整理汇总了Java中de.agilecoders.wicket.core.Bootstrap.install方法的典型用法代码示例。如果您正苦于以下问题:Java Bootstrap.install方法的具体用法?Java Bootstrap.install怎么用?Java Bootstrap.install使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.agilecoders.wicket.core.Bootstrap
的用法示例。
在下文中一共展示了Bootstrap.install方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initBootstrap
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
protected void initBootstrap()
{
LessCompilerConfigurationFactory lessConfigFactory = () -> {
Configuration lessConfig = new Configuration();
lessConfig.setCompressing(
RuntimeConfigurationType.DEPLOYMENT.equals(getConfigurationType()));
return lessConfig;
};
WicketWebjars.install(this);
BootstrapLess.install(this, lessConfigFactory);
Bootstrap.install(this);
IBootstrapSettings settings = Bootstrap.getSettings(this);
settings.setCssResourceReference(CustomBootstrapLessReference.get());
}
示例2: init
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
@Override
public void init() {
super.init();
getDebugSettings().setAjaxDebugModeEnabled(false);
getExceptionSettings().setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_EXCEPTION_PAGE);
getComponentInstantiationListeners().add(new SpringComponentInjector(this));
final IBootstrapSettings bootstrapSettings = new BootstrapSettings()
.useCdnResources(getConfigurationType() == RuntimeConfigurationType.DEPLOYMENT)
.setThemeProvider(new SingleThemeProvider(BootswatchTheme.Cosmo));
Bootstrap.install(this, bootstrapSettings);
//Howler.install(this);
mountPages();
}
示例3: init
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
@Override
public void init() {
super.init();
getDebugSettings().setAjaxDebugModeEnabled(false);
getExceptionSettings().setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_EXCEPTION_PAGE);
getComponentInstantiationListeners().add(new SpringComponentInjector(this));
final IBootstrapSettings bootstrapSettings = new BootstrapSettings()
.useCdnResources(getConfigurationType() == RuntimeConfigurationType.DEPLOYMENT)
.setThemeProvider(new SingleThemeProvider(BootswatchTheme.Cosmo));
Bootstrap.install(this, bootstrapSettings);
//Howler.install(this);
((SecurePackageResourceGuard) getResourceSettings().getPackageResourceGuard()).addPattern("+*.map");
JQueryFix1_12_1.apply(this);
mountPages();
}
示例4: configureBootstrap
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
private void configureBootstrap() {
final BootstrapSettings settings = new BootstrapSettings();
// settings.useJqueryPP(false).useModernizr(false).useResponsiveCss(true)
// .setJsResourceFilterName("footer-container");
// reactivate if new less4j version is available:
// settings.getBootstrapLessCompilerSettings().setUseLessCompiler(usesDevelopmentConfig());
// settings.getBootstrapLessCompilerSettings().setLessCompiler(new
// Less4JCompiler());
ThemeProvider themeProvider = new BootswatchThemeProvider() {
{
defaultTheme("united");
}
};
settings.setThemeProvider(themeProvider);
Bootstrap.install(this, settings);
}
示例5: init
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
/**
* @see org.apache.wicket.Application#init()
*/
@Override
public void init() {
super.init();
BootstrapSettings settings = new BootstrapSettings();
Bootstrap.install(this, settings);
configureTheme(settings);
getComponentInstantiationListeners().add(
new SpringComponentInjector(this, context));
}
示例6: init
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
/**
* @see org.apache.wicket.Application#init()
*/
@Override
public void init()
{
super.init();
WicketWebjars.install(this);
Bootstrap.install(this);
// add your configuration here
}
示例7: initBootstrap
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
private void initBootstrap() {
BootstrapSettings settings = new BootstrapSettings();
final ThemeProvider themeProvider = new BootswatchThemeProvider(BootswatchTheme.Spacelab);
settings.setThemeProvider(themeProvider);
Bootstrap.install(this, settings);
}
示例8: init
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
@Override
protected void init() {
// should be always called first
super.init();
Bootstrap.install(this);
getComponentInstantiationListeners().add(
new SpringComponentInjector(this));
}
示例9: registerHeaderContributors
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
/**
* not bundling resources here since this actually introduces problems and might in fact decrease load time instead
* of improving it (e.g. with respond.js)
*/
protected void registerHeaderContributors() {
final BootstrapSettings bootstrapSettings = new BootstrapSettings();
bootstrapSettings.setAutoAppendResources(false);
customizeBootstrapSettings(bootstrapSettings);
Bootstrap.install(webApplication, bootstrapSettings);
final BootstrapExtensionsHeaderContributor headerContributor = newBootstrapExtensionsHeaderContributor(
bootstrapSettings);
webApplication.getHeaderContributorListeners().add(headerContributor);
}
示例10: configureBootstrap
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
/**
* Configures wicket-bootstrap.
*/
private void configureBootstrap() {
// configure default bootstrap libs loading wrt. vfs urls
configureVfsURLHandler();
// Remove Wicket markup as it may lead to strange UI problems because
// CSS selectors may not match anymore.
getMarkupSettings().setStripWicketTags(true);
BootstrapSettings settings = new BootstrapSettings();
Bootstrap.install(this, settings);
}
示例11: initBootstrap
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
private void initBootstrap() {
final ThemeProvider themeProvider = new BootswatchThemeProvider() {
{
add(new MetroTheme());
add(new GoogleTheme());
add(new WicketTheme());
add(new Bootstrap3Theme());
defaultTheme("united");
}
};
BootstrapSettings settings = new BootstrapSettings();
settings.setJsResourceFilterName("footer-container")
.setThemeProvider(themeProvider);
Bootstrap.install(this, settings);
}
示例12: init
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
@Override
protected void init() {
super.init();
new ExtendedCdiConfiguration().configure(this);
BootstrapSettings bootstrapSettings = new BootstrapSettings();
bootstrapSettings.setCssResourceReference(Resources.BOOTSTRAP_CSS);
Bootstrap.install(this, bootstrapSettings);
mountPage(MessageFormat.format("/product/$'{'{0}'}'",EntityResolver.PRODUCT), BrowsePage.class);
mountPage("/review", NotFinishedPage.class);
mountPage(MessageFormat.format("/edit/#'{'{0}'}'",EntityResolver.PRODUCT), EditProductPage.class);
mountPage(MessageFormat.format("/edit/#'{'{0}'}'/version/#'{'{1}'}'",EntityResolver.PRODUCT, EntityResolver.VERSION), EditVersionPage.class);
}
示例13: configureBootstrap
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
private void configureBootstrap() {
final IBootstrapSettings settings = new BootstrapSettings();
settings.useCdnResources(true);
final ThemeProvider themeProvider = new BootswatchThemeProvider(BootswatchTheme.Spacelab);
settings.setThemeProvider(themeProvider);
Bootstrap.install(this, settings);
BootstrapLess.install(this);
}
示例14: initBootstrap
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
private void initBootstrap() {
Bootstrap.install(this,
new BootstrapSettings()
//bootstrap CSS is provided via markup (CSS link in HTML head)
.setThemeProvider(new SingleThemeProvider(new ExtremeNoopTheme())));
}
示例15: init
import de.agilecoders.wicket.core.Bootstrap; //导入方法依赖的package包/类
@Override
public void init() {
super.init();
IBootstrapSettings settings = new BootstrapSettings();
settings.setAutoAppendResources(false);
settings.setThemeProvider(new GizmoThemeProvider());
Bootstrap.install(this, settings);
BootstrapLess.install(this);
getComponentInstantiationListeners().add(new SpringComponentInjector(this));
IResourceSettings resourceSettings = getResourceSettings();
resourceSettings.setThrowExceptionOnMissingResource(false);
getMarkupSettings().setStripWicketTags(true);
getMarkupSettings().setDefaultBeforeDisabledLink("");
getMarkupSettings().setDefaultAfterDisabledLink("");
if (RuntimeConfigurationType.DEVELOPMENT.equals(getConfigurationType())) {
getDebugSettings().setAjaxDebugModeEnabled(true);
getDebugSettings().setDevelopmentUtilitiesEnabled(true);
}
//exception handling an error pages
IApplicationSettings appSettings = getApplicationSettings();
appSettings.setAccessDeniedPage(PageError401.class);
appSettings.setInternalErrorPage(PageError.class);
appSettings.setPageExpiredErrorPage(PageError.class);
new AnnotatedMountScanner().scanPackage(PageTemplate.class.getPackage().getName()).mount(this);
mount(new MountedMapper("/error", PageError.class, new UrlPathPageParametersEncoder()));
mount(new MountedMapper("/error/401", PageError401.class, new UrlPathPageParametersEncoder()));
mount(new MountedMapper("/error/403", PageError403.class, new UrlPathPageParametersEncoder()));
mount(new MountedMapper("/error/404", PageError404.class, new UrlPathPageParametersEncoder()));
getRequestCycleListeners().add(new AbstractRequestCycleListener() {
@Override
public IRequestHandler onException(RequestCycle cycle, Exception ex) {
LOGGER.error("Error occurred during page rendering, reason: {} (more on DEBUG level)", ex.getMessage());
LOGGER.debug("Error occurred during page rendering", ex);
return new RenderPageRequestHandler(new PageProvider(new PageError(ex)));
}
});
}