org.apache.struts.taglib.html

Class BaseFieldTag

public abstract class BaseFieldTag extends BaseInputTag

Convenience base class for the various input tags for text fields.

Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected Stringaccept
Comma-delimited list of content types that a server processing this form will handle correctly.
protected booleanredisplay
The "redisplay contents" flag (used only on password).
protected Stringtype
The type of input field represented by this tag (text, password, or hidden).
Method Summary
intdoStartTag()
Generate the required input tag.
protected StringformatValue(Object value)
Return the given value as a formatted String.
StringgetAccept()
booleangetRedisplay()
protected voidprepareValue(StringBuffer results)
Render the value element
voidrelease()
Release any acquired resources.
protected StringrenderInputElement()
Renders a fully formed <input> element.
voidsetAccept(String accept)
voidsetRedisplay(boolean redisplay)

Field Detail

accept

protected String accept
Comma-delimited list of content types that a server processing this form will handle correctly. This property is defined only for the file tag, but is implemented here because it affects the rendered HTML of the corresponding <input> tag.

redisplay

protected boolean redisplay
The "redisplay contents" flag (used only on password).

type

protected String type
The type of input field represented by this tag (text, password, or hidden).

Method Detail

doStartTag

public int doStartTag()
Generate the required input tag.

Support for indexed property since Struts 1.1

Throws: JspException if a JSP exception has occurred

formatValue

protected String formatValue(Object value)
Return the given value as a formatted String. This implementation escapes potentially harmful HTML characters.

Parameters: value The value to be formatted. null values will be returned as the empty String "".

Throws: JspException if a JSP exception has occurred

Since: Struts 1.2

getAccept

public String getAccept()

getRedisplay

public boolean getRedisplay()

prepareValue

protected void prepareValue(StringBuffer results)
Render the value element

Parameters: results The StringBuffer that output will be appended to.

release

public void release()
Release any acquired resources.

renderInputElement

protected String renderInputElement()
Renders a fully formed <input> element.

Throws: JspException

Since: Struts 1.2

setAccept

public void setAccept(String accept)

setRedisplay

public void setRedisplay(boolean redisplay)
Copyright © 2000-2008 - The Apache Software Foundation