jsp使用自定义标签taglib分页系列——DrilldownTag.java
2008-03-14 17:16
507 查看
导读:
package com.avantouch.common.web.struts.taglib;
import javax.servlet.jsp.JspException;
import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
/**
* Title DrilldownTag.java
* Description
* Copyright: Copyright (c) 2004 AvanTouch,Inc
* Company: AvanTouch,Inc
* @author: david 2004-12-7
* @modifier:
* @version 1.0
*/
public class DrilldownTag extends ContentBase {
private String link = null;
private String name = null;
private String property = null;
private String method = "details";
/**
* The scope of the bean specified by the name property, if any.
*/
protected String scope = null;
public int doStartTag() throws JspException {
writeTDHeaders();
writeHyperlink();
return (SKIP_BODY);
}
public int doEndTag() throws JspException {
writeTDEnd();
release();
// Continue processing this page
return (EVAL_PAGE);
}
/**
* write hyperlink
* p>
* @throws JspException
* @author david 2004-12-7
* @Since 1.0
*/
public void writeHyperlink() throws JspException {
Object value = null;
if (name != null) {
value = RequestUtils.lookup(pageContext, name, property, scope);
} else {
value = property;
}
link = link + "?method=" + method + "&key=" + value;
StringBuffer buf = new StringBuffer("");
buf.append(value);
buf.append("");
ResponseUtils.write(pageContext, buf.toString());
} // end writeHyperlink
/**
* Release all allocated resources.
*/
public void release() {
super.release();
link = null;
name = null;
property = null;
scope = null;
}
public String getLink() {
return link;
}
public String getName() {
return name;
}
public String getProperty() {
return property;
}
public void setName(String name) {
this.name = name;
}
public void setProperty(String property) {
this.property = property;
}
public String getScope() {
return scope;
}
public void setLink(String action) {
this.link = action;
}
public void setScope(String scope) {
this.scope = scope;
}
public String getMethod() {
return method;
}
public void setMethod(String string) {
method = string;
}
}
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1653448
本文转自
http://blog.csdn.net/cao_david/archive/2007/06/15/1653448.aspx
package com.avantouch.common.web.struts.taglib;
import javax.servlet.jsp.JspException;
import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
/**
* Title DrilldownTag.java
* Description
* Copyright: Copyright (c) 2004 AvanTouch,Inc
* Company: AvanTouch,Inc
* @author: david 2004-12-7
* @modifier:
* @version 1.0
*/
public class DrilldownTag extends ContentBase {
private String link = null;
private String name = null;
private String property = null;
private String method = "details";
/**
* The scope of the bean specified by the name property, if any.
*/
protected String scope = null;
public int doStartTag() throws JspException {
writeTDHeaders();
writeHyperlink();
return (SKIP_BODY);
}
public int doEndTag() throws JspException {
writeTDEnd();
release();
// Continue processing this page
return (EVAL_PAGE);
}
/**
* write hyperlink
* p>
writeHyperlink
* @throws JspException
* @author david 2004-12-7
* @Since 1.0
*/
public void writeHyperlink() throws JspException {
Object value = null;
if (name != null) {
value = RequestUtils.lookup(pageContext, name, property, scope);
} else {
value = property;
}
link = link + "?method=" + method + "&key=" + value;
StringBuffer buf = new StringBuffer("");
buf.append(value);
buf.append("");
ResponseUtils.write(pageContext, buf.toString());
} // end writeHyperlink
/**
* Release all allocated resources.
*/
public void release() {
super.release();
link = null;
name = null;
property = null;
scope = null;
}
public String getLink() {
return link;
}
public String getName() {
return name;
}
public String getProperty() {
return property;
}
public void setName(String name) {
this.name = name;
}
public void setProperty(String property) {
this.property = property;
}
public String getScope() {
return scope;
}
public void setLink(String action) {
this.link = action;
}
public void setScope(String scope) {
this.scope = scope;
}
public String getMethod() {
return method;
}
public void setMethod(String string) {
method = string;
}
}
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1653448
本文转自
http://blog.csdn.net/cao_david/archive/2007/06/15/1653448.aspx
相关文章推荐
- jsp使用自定义标签taglib分页系列——PaginationTag.java
- jsp使用自定义标签taglib分页系列——TRTag.java
- jsp使用自定义标签taglib分页系列——DrilldownTag.java
- jsp使用自定义标签taglib分页系列——ColumntextTag.java
- jsp使用自定义标签taglib分页系列——TDTag.java
- jsp使用自定义标签taglib分页系列——ContentBase.java
- jsp使用自定义标签taglib分页系列——ListTag.java
- jsp使用自定义标签taglib分页系列——ColumntextTag.java
- jsp使用自定义标签taglib分页系列——ColumndeleteTag.java
- jsp使用自定义标签taglib分页系列——TableBase.java
- jsp使用自定义标签taglib分页系列——ColumnbuttonTag.java
- jsp使用自定义标签taglib分页系列——TableTag.java
- jsp使用自定义标签taglib分页系列——ColumneditTag.java
- jsp使用自定义标签taglib分页系列——avantouch-common.tld
- jsp使用自定义标签taglib分页系列——SearchForm
- jsp使用自定义标签taglib分页系列——avantouch-common.tld
- jsp使用自定义标签taglib分页系列——概述
- jsp使用自定义标签taglib分页系列——完整例子
- jsp使用自定义标签taglib分页系列——例子list.jsp
- jsp使用自定义标签taglib分页系列——SearchForm - cao_david的专栏 - CSDNBlog