public class WriteTag
extends javax.servlet.jsp.tagext.TagSupport
Modifier and Type | Field and Description |
---|---|
protected String |
bundle
The servlet context attribute key for our resources.
|
static String |
DATE_FORMAT_KEY
The key to search default format string for java.util.Date in
resources.
|
protected boolean |
filter
Filter the rendered output for characters that are sensitive in HTML?
|
static String |
FLOAT_FORMAT_KEY
The key to search default format string for float (double, BigDecimal)
in resources.
|
protected String |
formatKey
The key to search format string in applciation resources
|
protected String |
formatStr
The format string to be used as format to convert value to String.
|
protected boolean |
ignore
Should we ignore missing beans and simply output nothing?
|
static String |
INT_FORMAT_KEY
The key to search default format string for int (byte, short, etc.) in
resources.
|
protected String |
localeKey
The session scope key under which our Locale is stored.
|
protected static MessageResources |
messages
The message resources for this package.
|
protected String |
name
Name of the bean that contains the data we will be rendering.
|
protected String |
property
Name of the property to be accessed on the specified bean.
|
protected String |
scope
The scope to be searched to retrieve the specified bean.
|
static String |
SQL_DATE_FORMAT_KEY
The key to search default format string for java.sql.Date in
resources.
|
static String |
SQL_TIME_FORMAT_KEY
The key to search default format string for java.sql.Time in
resources.
|
static String |
SQL_TIMESTAMP_FORMAT_KEY
The key to search default format string for java.sql.Timestamp in
resources.
|
Constructor and Description |
---|
WriteTag() |
Modifier and Type | Method and Description |
---|---|
int |
doStartTag()
Process the start tag.
|
protected String |
formatValue(Object valueToFormat)
Format value according to specified format string (as tag attribute or
as string from message resources) or to current user locale.
|
String |
getBundle() |
boolean |
getFilter() |
String |
getFormat() |
String |
getFormatKey() |
boolean |
getIgnore() |
String |
getLocale() |
String |
getName() |
String |
getProperty() |
String |
getScope() |
void |
release()
Release all allocated resources.
|
protected String |
retrieveFormatString(String formatKey)
Retrieve format string from message bundle and return null if message
not found or message string.
|
void |
setBundle(String bundle) |
void |
setFilter(boolean filter) |
void |
setFormat(String formatStr) |
void |
setFormatKey(String formatKey) |
void |
setIgnore(boolean ignore) |
void |
setLocale(String localeKey) |
void |
setName(String name) |
void |
setProperty(String property) |
void |
setScope(String scope) |
public static final String SQL_TIMESTAMP_FORMAT_KEY
public static final String SQL_DATE_FORMAT_KEY
public static final String SQL_TIME_FORMAT_KEY
public static final String DATE_FORMAT_KEY
public static final String INT_FORMAT_KEY
public static final String FLOAT_FORMAT_KEY
protected static MessageResources messages
protected boolean filter
protected boolean ignore
protected String name
protected String property
protected String scope
protected String formatStr
protected String formatKey
protected String localeKey
protected String bundle
public boolean getFilter()
public void setFilter(boolean filter)
public boolean getIgnore()
public void setIgnore(boolean ignore)
public String getName()
public void setName(String name)
public String getProperty()
public void setProperty(String property)
public String getScope()
public void setScope(String scope)
public String getFormat()
public void setFormat(String formatStr)
public String getFormatKey()
public void setFormatKey(String formatKey)
public String getLocale()
public void setLocale(String localeKey)
public String getBundle()
public void setBundle(String bundle)
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredprotected String retrieveFormatString(String formatKey) throws javax.servlet.jsp.JspException
formatKey
- value to use as key to search message in bundlejavax.servlet.jsp.JspException
- if a JSP exception has occurredprotected String formatValue(Object valueToFormat) throws javax.servlet.jsp.JspException
applyLocalizedPattern
is used. For more about localized
patterns, see
valueToFormat
- value to process and convert to Stringjavax.servlet.jsp.JspException
- if a JSP exception has occurredpublic void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.TagSupport
Copyright © 2000–2017 Apache Software Foundation. All rights reserved.