gpt4 book ai didi

org.apache.cocoon.components.flow.WebContinuation.getAttribute()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 02:29:05 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.cocoon.components.flow.WebContinuation.getAttribute()方法的一些代码示例,展示了WebContinuation.getAttribute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebContinuation.getAttribute()方法的具体详情如下:
包路径:org.apache.cocoon.components.flow.WebContinuation
类名称:WebContinuation
方法名:getAttribute

WebContinuation.getAttribute介绍

[英]Get an attribute of this continuation
[中]获取此延续的属性

代码示例

代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl

public Object jsFunction_getAttribute(String name) {
  return org.mozilla.javascript.Context.javaToJS(
      wk.getAttribute(name),
      getParentScope());
}

代码示例来源:origin: org.apache.cocoon/cocoon-forms-impl

public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException {
  super.setup(resolver, objectModel, src, par);
  
  Request req = ObjectModelHelper.getRequest(objectModel);
  
  String continuationId = par.getParameter("continuation-id", req.getParameter("continuation-id"));
  String widgetPath = par.getParameter("widget", req.getParameter("widget")).replace('.', '/');
  this.filter = par.getParameter("filter", req.getParameter("filter"));
  
  // The interpreter id is the sitemap's URI
  String interpreterId = SitemapParameters.getLocation(parameters).getURI();
  wk = this.contManager.lookupWebContinuation(continuationId, interpreterId);
  if (wk == null || wk.disposed()) {
    throw new InvalidContinuationException("Cannot get continuation for suggestion list");
  }
  
  Form form = (Form)wk.getAttribute("form");
  if (form == null) {
    throw new ProcessingException("No form is attached to the continuation");
  }
  
  this.locale = form.getLocale();
  
  Field field = (Field)form.lookupWidget(widgetPath);
  list = field.getSuggestionList();
  if (list == null) {
    throw new ProcessingException(field + " has no suggestion list");
  }
}

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