本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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: 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;
}
}
示例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;
}
}
示例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;
}
}
示例9: onDoStartTag
public int onDoStartTag() throws JspException {
boolean show = showTagBody(getName());
if (show) {
return TagSupport.EVAL_BODY_INCLUDE;
} else {
return TagSupport.SKIP_BODY;
}
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例13: doStartTag
@Override
public int doStartTag() {
Boolean result = FoundationUtil.needToValidation(pageContext.getSession());
if (result) {
return TagSupport.EVAL_BODY_INCLUDE;
} else {
return TagSupport.SKIP_BODY;
}
}
示例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;
}
示例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;
}
}