gpt4 book ai didi

net.skirnir.freyja.zpt.ZptTemplateContext类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:10:34 26 4
gpt4 key购买 nike

本文整理了Java中net.skirnir.freyja.zpt.ZptTemplateContext类的一些代码示例,展示了ZptTemplateContext类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZptTemplateContext类的具体详情如下:
包路径:net.skirnir.freyja.zpt.ZptTemplateContext
类名称: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);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com