1,64 → 1,64 |
package ak.hostadmiral.core.taglib.list; |
|
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.jsp.JspException; |
import javax.servlet.jsp.tagext.TagSupport; |
import org.apache.struts.util.RequestUtils; |
|
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.jsp.JspException; |
import javax.servlet.jsp.tagext.TagSupport; |
import org.apache.struts.util.RequestUtils; |
import ak.hostadmiral.util.CollectionInfo; |
|
public abstract class ExistTagBase |
extends TagSupport |
{ |
protected String infoBean = null; |
|
public String getInfoBean() |
{ |
return this.infoBean; |
} |
|
public void setInfoBean(String infoBean) |
{ |
this.infoBean = infoBean; |
} |
|
protected String infoProperty = null; |
|
public String getInfoProperty() |
{ |
return this.infoProperty; |
} |
|
public void setInfoProperty(String infoProperty) |
{ |
this.infoProperty = infoProperty; |
} |
|
public int doStartTag() throws JspException |
{ |
if(condition()) |
return EVAL_BODY_INCLUDE; |
else |
return SKIP_BODY; |
} |
|
public int doEndTag() throws JspException |
{ |
return EVAL_PAGE; |
} |
|
protected abstract boolean condition() throws JspException; |
|
|
public abstract class ExistTagBase |
extends TagSupport |
{ |
protected String infoBean = null; |
|
public String getInfoBean() |
{ |
return this.infoBean; |
} |
|
public void setInfoBean(String infoBean) |
{ |
this.infoBean = infoBean; |
} |
|
protected String infoProperty = null; |
|
public String getInfoProperty() |
{ |
return this.infoProperty; |
} |
|
public void setInfoProperty(String infoProperty) |
{ |
this.infoProperty = infoProperty; |
} |
|
public int doStartTag() throws JspException |
{ |
if(condition()) |
return EVAL_BODY_INCLUDE; |
else |
return SKIP_BODY; |
} |
|
public int doEndTag() throws JspException |
{ |
return EVAL_PAGE; |
} |
|
protected abstract boolean condition() throws JspException; |
|
protected CollectionInfo getCollectionInfo() |
throws JspException |
{ |
return (CollectionInfo) |
RequestUtils.lookup(pageContext, infoBean, infoProperty, null); |
} |
return (CollectionInfo) |
RequestUtils.lookup(pageContext, infoBean, infoProperty, null); |
} |
|
public void release() |
{ |
super.release(); |
infoBean = null; |
infoProperty = null; |
} |
} |
{ |
super.release(); |
infoBean = null; |
infoProperty = null; |
} |
} |