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


Java TagSupport.SKIP_BODY属性代码示例

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


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

示例1: doStartTag

@SuppressWarnings("unchecked")
public int doStartTag() throws JspException {
           rowAlt = 0;
    try {
        
        //NodeTree theTree = (NodeTree) ExpressionUtil.evalNotNull("tree", "tree", tree, NodeTree.class, this, pageContext);
        NodeTree theTree = getTree();
        Iterator<Node> rootIterator = theTree.getRootNodes().iterator();
        
        pageContext.getOut().println("<table cellspacing=\"0\" cellpadding=\"0\">");
        
        displayHeader(pageContext.getOut());
        
        while (rootIterator.hasNext()) {
            display(pageContext.getOut(), rootIterator.next(), 0);
        }
        pageContext.getOut().println("</table>");
    } 
    catch (IOException ex) {
        throw new JspException(ex.getMessage(), ex);
    }

    // Never process the body.
    return TagSupport.SKIP_BODY;
}
 
开发者ID:DIA-NZ,项目名称:webcurator,代码行数:25,代码来源:TreeTag.java

示例2: doStartTag

@Override
public int doStartTag() throws JspException {
    try {
        if (name.contains(subGroupSeparator)) {
            int sepIndex = name.lastIndexOf(subGroupSeparator);
            String parentName = name.substring(0, sepIndex);
            String subGroupName = name.substring(sepIndex + subGroupSeparator.length());

            pageContext.getOut().print("<div class=\"subGroupParent\">");
            pageContext.getOut().print(parentName);
            pageContext.getOut().print("</div>");

            pageContext.getOut().print(subGroupSeparator);
            pageContext.getOut().print("<div class=\"subGroupChild\">");
            pageContext.getOut().print(subGroupName);
            pageContext.getOut().print("</div>");
        } else {
            pageContext.getOut().print(name);
        }
    } catch (IOException ex) {
        throw new JspException(ex);
    }

    return TagSupport.SKIP_BODY;
}
 
开发者ID:DIA-NZ,项目名称:webcurator,代码行数:25,代码来源:GrpNameTag.java

示例3: doStartTag

/**
 * Do after start tag parsed.
 * @throws JspException if anything goes wrong.
 * @return Return value
 */
@Override
public final int doStartTag() throws JspException {
    int rVal = TagSupport.SKIP_BODY;
    try {
        SessionMode mode =
            org.rti.webgenome.webui.util.PageContext.getSessionMode(
                (HttpServletRequest) pageContext.getRequest());
        if (mode == SessionMode.CLIENT) {
            rVal = TagSupport.EVAL_BODY_INCLUDE;
        }
    } catch (SessionTimeoutException e) {
        rVal = TagSupport.SKIP_BODY;
    }
    return rVal;
}
 
开发者ID:NCIP,项目名称:webgenome,代码行数:20,代码来源:OnlyIfClientModeTag.java

示例4: doStartTag

/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {
    int rval = TagSupport.SKIP_BODY;
    if (name != null && name.length() > 0) {
        Object obj = pageContext.findAttribute(name);
        if (obj != null) {
            if (!(obj instanceof Experiment)) {
                throw new JspException("Bean named '"
                        + this.name + "' not of type Experiment");
            }
            Experiment exp = (Experiment) obj;
            if (exp.isDerived()) {
                AnalysisDataSourceProperties props =
                    (AnalysisDataSourceProperties)
                    exp.getDataSourceProperties();
                Collection<UserConfigurableProperty> userProps =
                    props.getUserConfigurableProperties();
                if (userProps != null && userProps.size() > 0) {
                    rval = TagSupport.EVAL_BODY_INCLUDE;
                }
            }
        }
    }
    return rval;
}
 
开发者ID:NCIP,项目名称:webgenome,代码行数:28,代码来源:OnlyIfParameteredDerivedExperimentTag.java

示例5: doStartTag

/**
 * Do after start tag parsed.
 * @throws JspException if anything goes wrong.
 * @return Return value
 */
@Override
public final int doStartTag() throws JspException {
    int rVal = TagSupport.SKIP_BODY;
    try {
        Principal principal =
            org.rti.webgenome.webui.util.PageContext.getPrincipal(
                (HttpServletRequest) pageContext.getRequest());
        if (principal.isAdmin()) {
            rVal = TagSupport.EVAL_BODY_INCLUDE;
        }
    } catch (SessionTimeoutException e) {
        rVal = TagSupport.SKIP_BODY;
    }
    return rVal;
}
 
开发者ID:NCIP,项目名称:webgenome,代码行数:20,代码来源:OnlyIfAdminTag.java

示例6: doStartTag

/**
 * Do after start tag parsed.
 * @throws JspException if anything goes wrong.
 * @return Return value
 */
@Override
public final int doStartTag() throws JspException {
    Map<String, QuantitationType> index =
        QuantitationType.getQuantitationTypeIndex();
    Writer out = pageContext.getOut();
    for (String id : index.keySet()) {
        String name = index.get(id).getName();
        try {
            out.write("<option value=\"" + id + "\">" + name + "</option>");
        } catch (IOException e) {
            throw new JspException("Error writing to page.");
        }
    }
    return TagSupport.SKIP_BODY;
}
 
开发者ID:NCIP,项目名称:webgenome,代码行数:20,代码来源:QuantitationTypeOptionsTag.java

示例7: doStartTag

@Override
public int doStartTag() throws JspException {
    JspWriter out = this.pageContext.getOut();
    try {
        out.print(FlashbackSupport.format(time));
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    return TagSupport.SKIP_BODY;
}
 
开发者ID:zh-h,项目名称:spring-abc,代码行数:12,代码来源:Flashback.java

示例8: onDoStartTag

public int onDoStartTag() throws JspException {
    if (getSubject() == null || !getSubject().isAuthenticated()) {
        if (log.isTraceEnabled()) {
            log.trace("Subject does not exist or is not authenticated.  Tag body will be evaluated.");
        }
        return TagSupport.EVAL_BODY_INCLUDE;
    } else {
        if (log.isTraceEnabled()) {
            log.trace("Subject exists and is authenticated.  Tag body will not be evaluated.");
        }
        return TagSupport.SKIP_BODY;
    }
}
 
开发者ID:xuegongzi,项目名称:rabbitframework,代码行数:13,代码来源:NotAuthenticatedTag.java

示例9: onDoStartTag

public int onDoStartTag() throws JspException {
    if (getSubject() == null || getSubject().getPrincipal() == null) {
        if (log.isTraceEnabled()) {
            log.trace("Subject does not exist or does not have a known identity (aka 'principal').  " +
                    "Tag body will be evaluated.");
        }
        return TagSupport.EVAL_BODY_INCLUDE;
    } else {
        if (log.isTraceEnabled()) {
            log.trace("Subject exists or has a known identity (aka 'principal').  " +
                    "Tag body will not be evaluated.");
        }
        return TagSupport.SKIP_BODY;
    }
}
 
开发者ID:xuegongzi,项目名称:rabbitframework,代码行数:15,代码来源:GuestTag.java

示例10: onDoStartTag

public int onDoStartTag() throws JspException {
    if (getSubject() != null && getSubject().isAuthenticated()) {
        if (log.isTraceEnabled()) {
            log.trace("Subject exists and is authenticated.  Tag body will be evaluated.");
        }
        return TagSupport.EVAL_BODY_INCLUDE;
    } else {
        if (log.isTraceEnabled()) {
            log.trace("Subject does not exist or is not authenticated.  Tag body will not be evaluated.");
        }
        return TagSupport.SKIP_BODY;
    }
}
 
开发者ID:xuegongzi,项目名称:rabbitframework,代码行数:13,代码来源:AuthenticatedTag.java

示例11: onDoStartTag

public int onDoStartTag() throws JspException {
    boolean show = showTagBody(getName());
    if (show) {
        return TagSupport.EVAL_BODY_INCLUDE;
    } else {
        return TagSupport.SKIP_BODY;
    }
}
 
开发者ID:xuegongzi,项目名称:rabbitframework,代码行数:8,代码来源:RoleTag.java

示例12: onDoStartTag

public int onDoStartTag() throws JspException {

        String p = getName();

        boolean show = showTagBody(p);
        if (show) {
            return TagSupport.EVAL_BODY_INCLUDE;
        } else {
            return TagSupport.SKIP_BODY;
        }
    }
 
开发者ID:xuegongzi,项目名称:rabbitframework,代码行数:11,代码来源:PermissionTag.java

示例13: doStartTag

@Override
public int doStartTag() throws JspException {
    JspWriter jspWriter = this.pageContext.getOut();
    try {
        jspWriter.println("自定义标签"+ name + "你好");
    } catch (IOException e) {
        e.printStackTrace();
    }

    return TagSupport.SKIP_BODY; // 跳过body, 直接结束标签
}
 
开发者ID:bejondshao,项目名称:personal,代码行数:11,代码来源:HelloTag.java

示例14: doStartTag

@Override
public int doStartTag() {
    String userName = UserManager.getUserName(pageContext.getSession());
    if (userName != null) {
        return TagSupport.EVAL_BODY_INCLUDE;
    } else {
        return TagSupport.SKIP_BODY;
    }
}
 
开发者ID:8090boy,项目名称:gomall.la,代码行数:9,代码来源:UserLoginedTag.java

示例15: doStartTag

@Override
public int doStartTag() {
    Boolean result = FoundationUtil.needToValidation(pageContext.getSession());
    if (result) {
        return TagSupport.EVAL_BODY_INCLUDE;
    } else {
        return TagSupport.SKIP_BODY;
    }
}
 
开发者ID:8090boy,项目名称:gomall.la,代码行数:9,代码来源:UserValidationImageTag.java


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