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


Java TagSupport.EVAL_BODY_INCLUDE属性代码示例

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


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

示例1: doStartTag

@Override
public int doStartTag() throws JspException {  
	StringTokenizer tokenizer = new StringTokenizer(privileges, ";");
	String[] privs = new String[tokenizer.countTokens()];
	for(int i=0; tokenizer.hasMoreTokens(); i++) {
		privs[i] = tokenizer.nextToken();
	}
	
	if(ownedObject instanceof UserOwnable) {
		showControl = editMode && authorityManager.hasAtLeastOnePrivilege( (UserOwnable) ownedObject, privs);
	}
	else if(ownedObject instanceof AgencyOwnable) {
		showControl = editMode && authorityManager.hasAtLeastOnePrivilege( (AgencyOwnable) ownedObject, privs);
	}
	else {
		showControl = false;
	}
	// release the object (usually its a ti) from the tag to prevent a memory leak (Tags are pooled) 
	ownedObject = null;
	return TagSupport.EVAL_BODY_INCLUDE;
}
 
开发者ID:DIA-NZ,项目名称:webcurator,代码行数:21,代码来源:ShowControlTag.java

示例2: 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

示例3: 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

示例4: 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());
		Principal principal =
			org.rti.webgenome.webui.util.PageContext.getPrincipal(
					(HttpServletRequest) pageContext.getRequest());
		if (mode == SessionMode.STAND_ALONE && principal != null) {
			rVal = TagSupport.EVAL_BODY_INCLUDE;
		}
	} catch (SessionTimeoutException e) {
		rVal = TagSupport.SKIP_BODY;
	}
	return rVal;
}
 
开发者ID:NCIP,项目名称:webgenome,代码行数:23,代码来源:OnlyIfLoggedInAndStandAloneModeTag.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: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: doStartTag

@Override
public int doStartTag() throws JspException {
	Object object = this.pageContext.getAttribute(items);

	if (object != null && object instanceof List) {
		this.iterator = ((List) object).iterator();

		if (iterator.hasNext()) {
			this.pageContext.setAttribute(value, iterator.next());
			return TagSupport.EVAL_BODY_INCLUDE; // 执行标签体
		}
	}

	return SKIP_BODY;
}
 
开发者ID:bejondshao,项目名称:personal,代码行数:15,代码来源:IterateTag.java

示例12: 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

示例13: 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

示例14: doStartTag

public int doStartTag() {
	String currentName = UserManager.getUserName(pageContext.getSession());
	if (currentName != null) {
		Boolean c2cMode = BusinessModeEnum.C2C.name().equals(
				pageContext.getServletContext().getAttribute(AttributeKeys.BUSINESS_MODE));
		if (c2cMode) {
			if (shopService.isShopExists(currentName)) {
				return TagSupport.EVAL_BODY_INCLUDE;
			}
		}
	}
	return TagSupport.SKIP_BODY;
}
 
开发者ID:8090boy,项目名称:gomall.la,代码行数:13,代码来源:MyShopTag.java

示例15: doStartTag

@Override
public int doStartTag() {
	Boolean result = PropertiesUtil.getBooleanObject(this.key);
	if (result != null && result) {
		return TagSupport.EVAL_BODY_INCLUDE;
	} else {
		return TagSupport.SKIP_BODY;
	}
}
 
开发者ID:8090boy,项目名称:gomall.la,代码行数:9,代码来源:SettingsTag.java


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