导读:
package com.avantouch.common.web.struts.taglib;
import javax.servlet.jsp.JspException;
import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
import com.avantouch.common.web.struts.taglib.table.TDTag;
/**
*
*
*
*
* @author: david 2004-12-7
* @modifier:
* @version 1.0
*/
public class ColumntextTag extends TDTag {
private static final long serialVersionUID = 1L;
private String name = null;
private String property = null;
/**
* The scope of the bean specified by the name property, if any.
*/
protected String scope = null;
public int doStartTag() throws JspException {
writeTDHeaders();
Object value = RequestUtils.lookup(pageContext, name, property, scope);
ResponseUtils.write(pageContext, value.toString());
return (SKIP_BODY);
}
public int doEndTag() throws JspException {
writeTDEnd();
release();
// Continue processing this page
return (EVAL_PAGE);
}
/**
* Release all allocated resources.
*/
public void release() {
super.release();
name = null;
property = null;
scope = null;
}
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 setScope(String scope) {
this.scope = scope;
}
}
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1653447
本文转自
http://blog.csdn.net/cao_david/archive/2007/06/15/1653447.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;
import com.avantouch.common.web.struts.taglib.table.TDTag;
/**
*
Title ColumntextTag.java
*
Description
*
Copyright: Copyright (c) 2004 AvanTouch,Inc
*
Company: AvanTouch,Inc
* @author: david 2004-12-7
* @modifier:
* @version 1.0
*/
public class ColumntextTag extends TDTag {
private static final long serialVersionUID = 1L;
private String name = null;
private String property = null;
/**
* The scope of the bean specified by the name property, if any.
*/
protected String scope = null;
public int doStartTag() throws JspException {
writeTDHeaders();
Object value = RequestUtils.lookup(pageContext, name, property, scope);
ResponseUtils.write(pageContext, value.toString());
return (SKIP_BODY);
}
public int doEndTag() throws JspException {
writeTDEnd();
release();
// Continue processing this page
return (EVAL_PAGE);
}
/**
* Release all allocated resources.
*/
public void release() {
super.release();
name = null;
property = null;
scope = null;
}
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 setScope(String scope) {
this.scope = scope;
}
}
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1653447
本文转自
http://blog.csdn.net/cao_david/archive/2007/06/15/1653447.aspx