• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IStringResourceLoader类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.wicket.resource.loader.IStringResourceLoader的典型用法代码示例。如果您正苦于以下问题:Java IStringResourceLoader类的具体用法?Java IStringResourceLoader怎么用?Java IStringResourceLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IStringResourceLoader类属于org.apache.wicket.resource.loader包,在下文中一共展示了IStringResourceLoader类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import org.apache.wicket.resource.loader.IStringResourceLoader; //导入依赖的package包/类
@Override
public void init() {
    super.init();
    getMarkupSettings().setStripWicketTags(true);
    getMarkupSettings().setStripComments(true);
    getMarkupSettings().setDefaultMarkupEncoding(StandardCharsets.UTF_8.name());
    setHeaderResponseDecorator(r -> new JavaScriptFilteredIntoFooterHeaderResponse(r, SingularTemplate.JAVASCRIPT_CONTAINER));
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    new AnnotatedMountScanner().scanPackage("org.opensingular.studio").mount(this);
    List<IStringResourceLoader> stringResourceLoaders = getResourceSettings().getStringResourceLoaders();
    stringResourceLoaders.add(0, new ClassStringResourceLoader(appConfig.getClass()));
    getComponentOnConfigureListeners().add(component -> {
        boolean outputId = !component.getRenderBodyOnly();
        component.setOutputMarkupId(outputId).setOutputMarkupPlaceholderTag(outputId);
    });
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:17,代码来源:ServerStudioApplication.java


示例2: initNestedStringResourceLoader

import org.apache.wicket.resource.loader.IStringResourceLoader; //导入依赖的package包/类
protected void initNestedStringResourceLoader()
{
    List<IStringResourceLoader> loaders = new ArrayList<>(
            getResourceSettings().getStringResourceLoaders());
    NestedStringResourceLoader nestedLoader = new NestedStringResourceLoader(loaders,
            Pattern.compile("#\\(([^ ]*?)\\)"));
    getResourceSettings().getStringResourceLoaders().clear();
    getResourceSettings().getStringResourceLoaders().add(nestedLoader);
}
 
开发者ID:webanno,项目名称:webanno,代码行数:10,代码来源:WicketApplicationBase.java


示例3: init

import org.apache.wicket.resource.loader.IStringResourceLoader; //导入依赖的package包/类
@Override
    public void init() {
        super.init();

        getJavaScriptLibrarySettings().setJQueryReference(
                new PackageResourceReference(MidPointApplication.class,
                        "../../../../../webjars/adminlte/2.3.11/plugins/jQuery/jquery-2.2.3.min.js"));

        GuiComponents.init();

        getComponentInstantiationListeners().add(new SpringComponentInjector(this));

        ResourceSettings resourceSettings = getResourceSettings();
        resourceSettings.setParentFolderPlaceholder("$-$");
        resourceSettings.setHeaderItemComparator(new PriorityFirstComparator(true));
        SecurePackageResourceGuard guard = (SecurePackageResourceGuard) resourceSettings.getPackageResourceGuard();
        guard.addPattern("+*.woff2");

        List<IStringResourceLoader> resourceLoaders = resourceSettings.getStringResourceLoaders();
        resourceLoaders.add(0, new Utf8BundleStringResourceLoader("localization/Midpoint"));
        resourceLoaders.add(1, new Utf8BundleStringResourceLoader(SchemaConstants.SCHEMA_LOCALIZATION_PROPERTIES_RESOURCE_BASE_PATH));

        resourceSettings.setThrowExceptionOnMissingResource(false);
        getMarkupSettings().setStripWicketTags(true);
//        getMarkupSettings().setDefaultBeforeDisabledLink("");
//        getMarkupSettings().setDefaultAfterDisabledLink("");

        if (RuntimeConfigurationType.DEVELOPMENT.equals(getConfigurationType())) {
            getDebugSettings().setAjaxDebugModeEnabled(true);
            getDebugSettings().setDevelopmentUtilitiesEnabled(true);
            initializeDevelopmentSerializers();
        }

        //pretty url for resources (e.g. images)
        mountFiles(ImgResources.BASE_PATH, ImgResources.class);

        //exception handling an error pages
        ApplicationSettings appSettings = getApplicationSettings();
        appSettings.setAccessDeniedPage(PageError401.class);
        appSettings.setInternalErrorPage(PageError.class);
        appSettings.setPageExpiredErrorPage(PageError.class);

        mount(new MountedMapper("/error", PageError.class, new PageParametersEncoder()));
        mount(new MountedMapper("/error/401", PageError401.class, new PageParametersEncoder()));
        mount(new MountedMapper("/error/403", PageError403.class, new PageParametersEncoder()));
        mount(new MountedMapper("/error/404", PageError404.class, new PageParametersEncoder()));
        mount(new MountedMapper("/error/410", PageError410.class, new PageParametersEncoder()));

        getRequestCycleListeners().add(new LoggingRequestCycleListener(this));

        //descriptor loader, used for customization
        new DescriptorLoader().loadData(this);
    }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:54,代码来源:MidPointApplication.java


示例4: init

import org.apache.wicket.resource.loader.IStringResourceLoader; //导入依赖的package包/类
@Override
public void init() {
    super.init();

    getJavaScriptLibrarySettings().setJQueryReference(
            new PackageResourceReference(MidPointApplication.class,
                    "../../../../../webjars/adminlte/2.3.11/plugins/jQuery/jquery-2.2.3.min.js"));

    getComponentInstantiationListeners().add(new SpringComponentInjector(this));

    ResourceSettings resourceSettings = getResourceSettings();
    resourceSettings.setParentFolderPlaceholder("$-$");
    resourceSettings.setHeaderItemComparator(new PriorityFirstComparator(true));
    SecurePackageResourceGuard guard = (SecurePackageResourceGuard) resourceSettings.getPackageResourceGuard();
    guard.addPattern("+*.woff2");

    List<IStringResourceLoader> resourceLoaders = resourceSettings.getStringResourceLoaders();
    resourceLoaders.add(0, new MidPointStringResourceLoader(localizationService));

    resourceSettings.setThrowExceptionOnMissingResource(false);
    getMarkupSettings().setStripWicketTags(true);

    if (RuntimeConfigurationType.DEVELOPMENT.equals(getConfigurationType())) {
        getDebugSettings().setAjaxDebugModeEnabled(true);
        getDebugSettings().setDevelopmentUtilitiesEnabled(true);
        initializeDevelopmentSerializers();
    }

    //pretty url for resources (e.g. images)
    mountFiles(ImgResources.BASE_PATH, ImgResources.class);

    //exception handling an error pages
    ApplicationSettings appSettings = getApplicationSettings();
    appSettings.setAccessDeniedPage(PageError401.class);
    appSettings.setInternalErrorPage(PageError.class);
    appSettings.setPageExpiredErrorPage(PageError.class);

    mount(new MountedMapper("/error", PageError.class, new PageParametersEncoder()));
    mount(new MountedMapper("/error/401", PageError401.class, new PageParametersEncoder()));
    mount(new MountedMapper("/error/403", PageError403.class, new PageParametersEncoder()));
    mount(new MountedMapper("/error/404", PageError404.class, new PageParametersEncoder()));
    mount(new MountedMapper("/error/410", PageError410.class, new PageParametersEncoder()));

    getRequestCycleListeners().add(new LoggingRequestCycleListener(this));

    getAjaxRequestTargetListeners().add(new AjaxRequestTarget.AbstractListener() {

        @Override
        public void updateAjaxAttributes(AbstractDefaultAjaxBehavior behavior, AjaxRequestAttributes attributes) {
            // check whether behavior will use POST method, if not then don't put CSRF token there
            if (!isPostMethodTypeBehavior(behavior, attributes)) {
                return;
            }

            CsrfToken csrfToken = SecurityUtils.getCsrfToken();
            if (csrfToken == null) {
                return;
            }

            String parameterName = csrfToken.getParameterName();
            String value = csrfToken.getToken();

            attributes.getExtraParameters().put(parameterName, value);
        }
    });

    getSessionListeners().add((ISessionListener) asyncWebProcessManager);

    //descriptor loader, used for customization
    new DescriptorLoader().loadData(this);

    // for schrodinger selenide library
    initializeSchrodinger();
}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:75,代码来源:MidPointApplication.java



注:本文中的org.apache.wicket.resource.loader.IStringResourceLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AddCachePoolResponseProto类代码示例发布时间:2022-05-23
下一篇:
Java KeyInfo类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap