/*
* Created on 21-May-2003
*/
package net.sf.jportlet.web.taglib;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspWriter;
/**
* This Tag renders a column containing portlets
*
* @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
*
* @jsp.tag
* name="column"
* body-content="JSP"
* display-name="Column Tag"
*/
public class ColumnTag
extends ClientAwareTag
{
private String _width;
//~ Methods ----------------------------------------------------------------
/**
* @see net.sf.jportlet.web.taglib.BaseTag#doEndHtml(javax.servlet.http.HttpServletRequest)
*/
protected int doEndHtml( HttpServletRequest request )
throws IOException
{
pageContext.getOut( ).write( "</table></td>\n" );
return EVAL_PAGE;
}
/**
* @see net.sf.jportlet.web.taglib.BaseTag#doStartHtml(javax.servlet.http.HttpServletRequest)
*/
protected int doStartHtml( HttpServletRequest request )
throws IOException
{
JspWriter out = pageContext.getOut( );
out.write( "<td valign='top'" );
outputCss();
if ( _width != null )
{
out.write( " width='" + _width + "'");
}
out.write( "><table width='100%' border='0' cellspacing='0' cellpadding='0'>\n" );
return EVAL_BODY_INCLUDE;
}
/**
* @see javax.servlet.jsp.tagext.Tag#release()
*/
public void release() {
_width = null;
super.release();
}
/**
* @return String
*
* @jsp.attribute
* required="false"
* rtexprvalue="true"
* type="java.lang.String"
*/
public String getWidth() {
return _width;
}
/**
* Sets the width.
* @param width The width to set
*/
public void setWidth(String width) {
_width = width;
}
}