|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.SimpleTagSupport beanface.el.tags.DefineTag
public class DefineTag
A JSP Tag for mapping a variable to a constant value expression.
Constructor Summary | |
---|---|
DefineTag()
|
Method Summary | |
---|---|
void |
doTag()
|
java.lang.Class |
getExpectedType()
The explicit "expected type" to be used when constructing the literal value expression. |
java.lang.String |
getExpectedTypeName()
Gets the name of the explicit "expected type" from getExpectedType() , or null if it is not set. |
java.lang.Object |
getValue()
Get the value or expression to be mapped. |
java.lang.String |
getVar()
Get the name of the variable to be mapped. |
void |
setExpectedType(java.lang.Class expectedType)
Sets the "expected type" to be used when constructing the literal value expression via ExpressionFactory.createValueExpression(java.lang.Object, java.lang.Class) |
void |
setExpectedTypeName(java.lang.String expressionClassRef)
Sets the name of the "expected type" via setExpectedType(java.lang.Class) . |
void |
setValue(java.lang.Object value)
Sets the value to be mapped to the variable. |
void |
setVar(java.lang.String var)
Set the name of the variable to be mapped. |
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefineTag()
Method Detail |
---|
public java.lang.String getVar()
public void setVar(java.lang.String var)
var
- is the variable name (cannot be null).
java.lang.NullPointerException
- if var
is null.public java.lang.Object getValue()
public void setValue(java.lang.Object value)
value
- the value to map. Can be null
(to clear the
variable mapping), an instance of
ValueExpression
which will be evaluated at
the time of mapping, or a plain object.public java.lang.Class getExpectedType()
public void setExpectedType(java.lang.Class expectedType)
ExpressionFactory.createValueExpression(java.lang.Object, java.lang.Class)
expectedType
- the expected type. May be null
, in which case
the expected type used will be the class of the value when the
mapping is done.public java.lang.String getExpectedTypeName()
getExpectedType()
, or null if it is not set.
public void setExpectedTypeName(java.lang.String expressionClassRef) throws java.lang.ClassNotFoundException
setExpectedType(java.lang.Class)
.
expressionClassRef
- the name of the expected type, or null
to use
the default.
java.lang.ClassNotFoundException
- when expressionClassRef is not null
and can't
be loaded with
Class.forName(java.lang.String)
.public void doTag() throws javax.servlet.jsp.JspException, java.io.IOException
doTag
in interface javax.servlet.jsp.tagext.SimpleTag
doTag
in class javax.servlet.jsp.tagext.SimpleTagSupport
javax.servlet.jsp.JspException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |