當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。