当前位置: 首页>>代码示例>>Java>>正文


Java ComponentResources类代码示例

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


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

示例1: newBinding

import org.apache.tapestry5.ComponentResources; //导入依赖的package包/类
public Binding newBinding(String description, ComponentResources container, ComponentResources component,
        String expression, Location location) {
    Object target = container.getComponent();
    Class<?> targetClass = target.getClass();

    Matcher matcher = EXPRESSION_PATTERN.matcher(expression);
    if (!matcher.matches()) {
        String msg = String.format("Expression %s does not match %s", expression, EXPRESSION_PATTERN.pattern());
        throw new TapestryException(msg, location, null);
    }

    PropertyConduit mapConduit = source.create(targetClass, matcher.group(1));
    PropertyConduit keyConduit = source.create(targetClass, matcher.group(2));

    String toString = interner.format("MapPropBinding[%s %s(%s)]", description, container.getCompleteId(),
            expression);

    return new MapBinding(location, target, mapConduit, keyConduit, toString);
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:20,代码来源:MapBindingFactory.java

示例2: initializeAssetsFromPaths

import org.apache.tapestry5.ComponentResources; //导入依赖的package包/类
private void initializeAssetsFromPaths(final Resource baseResource,
        final String[] expandedPaths, final PlasticField assetsField)
{
    assetsField.injectComputed(new ComputedValue<Asset[]>()
    {

        @Override
        public Asset[] get(InstanceContext context)
        {
            ComponentResources resources = context.get(ComponentResources.class);

            return convertPathsToAssetArray(baseResource, resources.getLocale(), expandedPaths);
        }
    });
}
 
开发者ID:pubfactory,项目名称:tapestry-compat,代码行数:16,代码来源:AbstractIncludeWorker.java

示例3: defaultTitle

import org.apache.tapestry5.ComponentResources; //导入依赖的package包/类
Binding defaultTitle()
{
    ComponentResources pageResources = componentResources.getPage().getComponentResources();
    return bindingSource.newBinding("title from subordinate component page class", pageResources, BindingConstants.MESSAGE, "title");
}
 
开发者ID:Allogy,项目名称:isqrl-server,代码行数:6,代码来源:Layout.java


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