作者热门文章
- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.skirnir.freyja.zpt.ZptTemplateContext
类的一些代码示例,展示了ZptTemplateContext
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZptTemplateContext
类的具体详情如下:
包路径:net.skirnir.freyja.zpt.ZptTemplateContext
类名称:ZptTemplateContext
暂无
代码示例来源:origin: org.seasar.cms.ymir/ymir-extension
@Override
public VariableResolver getVariableResolver() {
if (variableResolver_ == null) {
variableResolver_ = new AnalyzerVariableResolver(super
.getVariableResolver());
}
return variableResolver_;
}
代码示例来源:origin: org.seasar.cms.ymir/ymir-extension
@Override
public void setVariableResolver(VariableResolver varResolver) {
super.setVariableResolver(varResolver);
variableResolver_ = null;
}
代码示例来源:origin: org.seasar.ymir/ymir-zpt
ZptTemplateContext talContext = (ZptTemplateContext) context;
if (!ATTR_CLASS.equals(talContext.getTargetName())
|| !ATTRIBUTES_TAG.equals(talContext
.getProcessingAttributeName())) {
throw new IllegalArgumentException(
"This expression type should be used only in "
.getElement(), ATTR_CLASS);
代码示例来源:origin: org.seasar.cms.ymir/ymir-extension
Map evaluate(ZptTemplateContext context, Attribute[] attrs) {
ExpressionEvaluator expEvaluator = context.getExpressionEvaluator();
VariableResolver varResolver = context.getVariableResolver();
List<Attribute> attrList = new ArrayList<Attribute>();
Attribute attributesAttr = null;
for (int i = 0; i < attrs.length; i++) {
if (attrs[i].getName().startsWith("tal:")) {
if ("tal:attributes".equals(attrs[i].getName())) {
attributesAttr = attrs[i];
}
} else {
attrList.add(attrs[i]);
}
}
if (attributesAttr != null) {
attrs = processAttributes(context, expEvaluator, varResolver,
attributesAttr, attrs, true);
}
return TagEvaluatorUtils.toMap(attrs);
}
代码示例来源:origin: org.seasar.cms.ymir/ymir-extension
public void defineVariable(int scope, String name, Object value) {
setUsedAsLocalVariable(name);
if (value != null && value instanceof DescWrapper) {
DescWrapper wrapper = (DescWrapper) value;
PropertyDesc propertyDesc = wrapper.getPropertyDesc();
if (propertyDesc != null) {
TypeDesc typeDesc = propertyDesc.getTypeDesc();
if (!typeDesc.isExplicit()) {
typeDesc.setClassDesc(getTemporaryClassDesc(name));
}
} else {
// self/entitiesのような形式ではなく、直接entitiesのように式が書かれている。
// 自動生成ではそのようなプロパティは今のところ扱わない。
;
}
}
super.defineVariable(scope, name, value);
}
代码示例来源:origin: org.seasar.cms.ymir/ymir-extension
public RepeatInfo pushRepeatInfo(String name, Object[] objs) {
setUsedAsLocalVariable(name);
if (objs != null && objs.length == 1 && objs[0] instanceof DescWrapper) {
DescWrapper wrapper = (DescWrapper) objs[0];
PropertyDesc propertyDesc = wrapper.getPropertyDesc();
if (propertyDesc != null) {
TypeDesc typeDesc = propertyDesc.getTypeDesc();
if (!typeDesc.isExplicit()) {
typeDesc.setArray(true);
typeDesc.setClassDesc(getTemporaryClassDesc(name));
}
objs[0] = new DescWrapper(typeDesc.getClassDesc());
} else {
// self/entitiesのような形式ではなく、直接entitiesのように式が書かれている。
// 自動生成ではそのようなプロパティは今のところ扱わない。
;
}
}
return super.pushRepeatInfo(name, objs);
}
代码示例来源:origin: org.seasar.ymir/ymir-zpt
ZptTemplateContext talContext = (ZptTemplateContext) context;
if (!ATTR_CLASS.equals(talContext.getTargetName())
|| !ATTRIBUTES_TAG.equals(talContext
.getProcessingAttributeName())) {
throw new IllegalArgumentException(
"This expression type should be used only in "
.getElement(), ATTR_CLASS);
Notes notes = (Notes) varResolver.getVariable(context,
RequestProcessor.ATTR_NOTES);
我是一名优秀的程序员,十分优秀!