RelatedTag.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:ontopia 作者:
@Override
public int doStartTag() throws JspTagException {
  ContextTag contextTag = FrameworkUtils.getContextTag(pageContext);
  if (related == null)
    buildModel(contextTag);

  TopicIF topic = (TopicIF) getVariableValue(this.topic);
  if (topic == null)
    throw new JspTagException("Couldn't find topic '" + topic + "'");
  List headings = related.makeModel(topic);
  pageContext.setAttribute(var, headings, PageContext.REQUEST_SCOPE);

  // FIXME: make new scope here
  if (contextTag != null)
    contextTag.getContextManager().setValue(var, headings);

  return EVAL_BODY_INCLUDE;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号