本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例11: onDoStartTag
public int onDoStartTag() throws JspException {
boolean show = showTagBody(getName());
if (show) {
return TagSupport.EVAL_BODY_INCLUDE;
} else {
return TagSupport.SKIP_BODY;
}
}
示例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;
}
}
示例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, 直接結束標簽
}
示例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;
}
}
示例15: doStartTag
@Override
public int doStartTag() {
Boolean result = FoundationUtil.needToValidation(pageContext.getSession());
if (result) {
return TagSupport.EVAL_BODY_INCLUDE;
} else {
return TagSupport.SKIP_BODY;
}
}