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


Java BodyTagSupport.SKIP_BODY属性代码示例

本文整理汇总了Java中javax.servlet.jsp.tagext.BodyTagSupport.SKIP_BODY属性的典型用法代码示例。如果您正苦于以下问题:Java BodyTagSupport.SKIP_BODY属性的具体用法?Java BodyTagSupport.SKIP_BODY怎么用?Java BodyTagSupport.SKIP_BODY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.servlet.jsp.tagext.BodyTagSupport的用法示例。


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

示例1: doStartTag

@Override
public int doStartTag() throws JspException {
    // 在标签开始处出发该方法
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
    SSOToken token = SSOHelper.getSSOToken(request);
    // 如果 token 或者 name 为空
    if (token != null && this.getName() != null && !"".equals(this.getName().trim())) {
        boolean result = SSOConfig.getInstance().getAuthorization().isPermitted(token, this.getName());
        if (result) {
            // 权限验证通过
            // 返回此则执行标签body中内容,SKIP_BODY则不执行
            return BodyTagSupport.EVAL_BODY_INCLUDE;
        }
    }
    return BodyTagSupport.SKIP_BODY;
}
 
开发者ID:baomidou,项目名称:kisso,代码行数:16,代码来源:HasPermissionTag.java

示例2: doStartTag

/**
 * Write a configuration property indicated in the tag id
 */
public int doStartTag()
   throws JspException
{
	try
	{
		String propName = this.getId();
		
		Debugger.println(this,"looking for config property id "+propName);
		
		this.pageContext.getOut().write(Config.getProperty(this.getId(),defaultValue));			
	} 
	catch (IOException e)
	{			
		Debugger.printError(e);

	}
	return BodyTagSupport.SKIP_BODY;
}
 
开发者ID:nyla-solutions,项目名称:nyla,代码行数:21,代码来源:ConfigTag.java

示例3: doEndTag

/**
 * {@inheritDoc}
 */
public int doEndTag() throws JspException {
    StringBuilder result = new StringBuilder();
    if (nolink || id == null) {
        result.append(writeIcon());
        result.append(name);
    }
    else {
        result.append("<a href=\"" +
                    ConfigChannelTag.makeConfigChannelUrl(id) + "\">");
        result.append(writeIcon());
        result.append(StringEscapeUtils.escapeXml(name) + "</a>");
    }
    JspWriter writer = pageContext.getOut();
    try {
        writer.write(result.toString());
    }
    catch (IOException e) {
        throw new JspException(e);
    }
    return BodyTagSupport.SKIP_BODY;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:24,代码来源:ConfigChannelTag.java

示例4: doStartTag

/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;
    setupRhnSet();
    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        renderCheckbox();
    }
    return retval;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:25,代码来源:SelectableColumnTag.java

示例5: doAfterBodyRenderBeforeData

private int doAfterBodyRenderBeforeData() throws JspException {
    ListTagUtil.write(pageContext, "</tr>");
    ListTagUtil.write(pageContext, "</thead>");

    ListTagUtil.setCurrentCommand(pageContext, getUniqueName(),
            ListCommand.BEFORE_RENDER);

    if (manip.isListEmpty()) {
        renderEmptyList();
        ListTagUtil.write(pageContext, "</table>");
        // close panel
        ListTagUtil.write(pageContext, "</div>");
        // close list
        ListTagUtil.write(pageContext, "</div>");

        return BodyTagSupport.SKIP_BODY;
    }
    ListTagUtil.write(pageContext, "<tbody>");

    // render first row. The rest will be rendered in subsequent
    // calls to doAfterBody
    return doAfterBodyRenderData();
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:23,代码来源:ListTag.java

示例6: doStartTag

/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        renderHiddenField();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        render(valueExpr);
    }
    return retval;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:26,代码来源:RadioColumnTag.java

示例7: loopTag

private void loopTag(TagSupport tag, JSPTreeNodeIF curNode)
  throws JspException, IOException {
  // loop as long as tag says so
  int token;
  do {
    runTag(tag, curNode);
    token = tag.doAfterBody();
  } while (token == BodyTagSupport.EVAL_BODY_AGAIN);
  if (token != BodyTagSupport.SKIP_BODY)
    throw new OntopiaRuntimeException("Internal error: unknown doAfterBody token: " + token);
}
 
开发者ID:ontopia,项目名称:ontopia,代码行数:11,代码来源:JSPPageExecuter.java

示例8: doEndTag

/**
  * {@inheritDoc}
  */
 @Override
public int doEndTag() throws JspException {
     StringBuilder result = new StringBuilder();
     if (nolink  || id == null) {
         result.append(writeIcon());
         result.append(StringEscapeUtils.escapeXml(path));
     }
     else {
         String url;
         if (revisionId != null) {
             url = makeConfigFileRevisionUrl(id, revisionId);
         }
         else {
             url = makeConfigFileUrl(id);
         }

         result.append("<a href=\"" + url + "\">");
         result.append(writeIcon());
         result.append(StringEscapeUtils.escapeXml(path) + "</a>");
     }
     JspWriter writer = pageContext.getOut();
     try {
         writer.write(result.toString());
     }
     catch (IOException e) {
         throw new JspException(e);
     }
     return BodyTagSupport.SKIP_BODY;
 }
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:32,代码来源:ConfigFileTag.java

示例9: doStartTag

/**
 * ${@inheritDoc}
 */
public int doStartTag() throws JspException {
    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    int retval = BodyTagSupport.SKIP_BODY;
    currentSortDir = fetchSortDir();

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
        if (isSortable()) {
            parent.setSortable(true);
        }
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        if (isBound) {
            renderBound();
            retval = BodyTagSupport.SKIP_BODY;
        }
        else {
            renderUnbound();
            retval = BodyTagSupport.EVAL_BODY_INCLUDE;
        }
    }
    return retval;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:33,代码来源:ColumnTag.java


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