|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.bea.content.manager.servlets.jsp.taglib.BaseTag
com.bea.content.manager.servlets.jsp.taglib.GetPropertyTag
Tag to retrieve or print a property of a Node.
The Node must be set as an attribute of the page context with the id specified in this tag.
If the property is of type Property.BINARY and is a text document (eg. .txt, .html) then the document will be printed. If the BINARY property is not a document (eg. .gif, .pdf) then ShowBinaryServlet should be used.
If the property name is not specified the primary property will be used, if defined.
If a resultId is defined then it will be set with the value(s) of the Property. If there are multiple values then it will be set as a Collection. If the resultId is not set then the value(s) will be printed
If the following standard properties are used as the property name then the corresponding value from the Node will be returned.
Field Summary | |
protected String |
baseHref
The BASE HREF to use. |
protected int |
blockSize
The block size to read the data in. |
protected String |
conversionType
The conversion type. |
protected String |
dateFormat
The date format to use. |
protected String |
defValue
The default value to print if the property is not found, or if the property does not contain a value. |
protected int |
endIndex
The index at which we should stop reading. |
protected boolean |
isMultiple
If this is true then a Collection will be returned as the resultId, if false then an Object will be returned that may be cast to the appropriate Property type. |
protected String |
name
The name of the property to print. |
protected Node |
node
The Node to use. |
protected String |
numFormat
The number format to use. |
protected Property |
property
The Property to use. |
protected String |
resultId
The id of the script variable to put the result into. |
protected String |
resultType
The Type of the result. |
protected int |
startIndex
The index at which we should start reading. |
protected int |
transactionTimeout
The streaming of the data directly to the jsp page is wrapped in a transaction to cover the situation where the back-end system is transactional (like a database) and the InputStream retrieved is tied to that transactional resource (like a BlobInputStream). |
Fields inherited from class com.bea.content.manager.servlets.jsp.taglib.BaseTag |
cacheId, cacheScope, cacheTimeout, failOnError, useCache |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
GetPropertyTag()
|
Method Summary | |
String |
convert(String in)
Convert a string with the current convertType. |
static String |
convert(String conversionType,
String in)
Convert a string according to the specified convertType. |
protected int |
doBinary(BinaryValue binaryValue)
|
protected int |
doNonBinary(Collection values)
|
int |
doStartTag()
Start the tag. |
String |
getBaseHref()
Get the value of baseHref . |
String |
getBlockSize()
Get the value of blockSize as a String. |
String |
getConversionType()
Get the value of conversionType . |
String |
getDateFormat()
Get the date format to use. |
String |
getDefault()
Get the default value. |
String |
getEndIndex()
Get the value of endIndex as a String. |
String |
getIsMultiple()
Get the value of isMultiple . |
String |
getName()
Get the value of name . |
Node |
getNode()
Get the Node to use. |
String |
getNumFormat()
Get the number format to use. |
Collection |
getPropertyValues()
|
URL |
getRequestBaseHref(HttpServletRequest request)
Gets the request base href. |
String |
getResultId()
Get the resultId . |
String |
getResultType()
Get the resultId . |
URL |
getServerBaseHref(HttpServletRequest request)
Gets the servers BaseHref. |
String |
getStartIndex()
Get the value of startIndex as a String. |
String |
getTransactionTimeout()
Get the value of transactionTimeout |
void |
print(String s)
Print the String to the JspWriter. |
void |
println(String s)
Println the String to the JspWriter. |
void |
release()
Release the tag. |
void |
setAttribute(Collection values)
Sets the given values on the pageContext. |
void |
setBaseHref(String v)
Set the value of baseHref . |
void |
setBlockSize(String v)
Set the value of blockSize . |
void |
setConversionType(String conversionType)
Sets the value of conversionType . |
void |
setDateFormat(String s)
Set the date format to use. |
void |
setDefault(String v)
Set the default value. |
void |
setEndIndex(int endIndex)
Set the value of endIndex . |
void |
setEndIndex(String v)
Set the value of endIndex . |
void |
setIsMultiple(boolean b)
Set the value of isMultiple . |
void |
setIsMultiple(String s)
Set the value of isMultiple . |
void |
setName(String v)
Set the value of name . |
void |
setNode(Node node)
Set the node to use. |
void |
setNumFormat(String s)
Set the number format to use. |
void |
setResultId(String resultId)
Set the resultId . |
void |
setResultType(String resultType)
Set the resultType . |
void |
setStartIndex(int startIndex)
Set the value of startIndex . |
void |
setStartIndex(String v)
Set the value of startIndex . |
void |
setTransactionTimeout(String timeout)
Set the value of transactionTimeout |
String |
toString(Calendar cal)
Convert a Calendar to our date format. |
String |
toString(Number n)
Convert a number to our date format. |
String |
toString(Object obj)
Convert an Object to a string with our current formatting. |
Methods inherited from class com.bea.content.manager.servlets.jsp.taglib.BaseTag |
getCacheId, getCacheScope, getCacheTimeout, getFailOnError, getHttpSession, getUseCache, getUserId, setCacheId, setCacheScope, setCacheTimeout, setCacheTimeout, setFailOnError, setFailOnError, setUseCache, setUseCache, toDictionary |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String baseHref
The content's identifier will be appended automatically to this.
protected int blockSize
protected String conversionType
protected String dateFormat
protected String defValue
protected int endIndex
protected boolean isMultiple
protected String name
protected Node node
protected String numFormat
protected Property property
protected String resultId
protected String resultType
protected int startIndex
protected int transactionTimeout
Constructor Detail |
public GetPropertyTag()
Method Detail |
public String convert(String in)
public static String convert(String conversionType, String in)
conversionType
- "html", "url", or anything else for no encoding.in
- the string
protected int doBinary(BinaryValue binaryValue) throws JspTagException
JspTagException
protected int doNonBinary(Collection values) throws JspTagException
JspTagException
public int doStartTag() throws JspException
JspException
public String getBaseHref()
baseHref
.
public String getBlockSize()
blockSize
as a String.
public String getConversionType()
conversionType
.
public String getDateFormat()
date format
to use.
public String getDefault()
default
value.
public String getEndIndex()
endIndex
as a String.
public String getIsMultiple()
isMultiple
.
public String getName()
name
.
public Node getNode()
public String getNumFormat()
number format
to use.
public Collection getPropertyValues() throws JspTagException
JspTagException
public URL getRequestBaseHref(HttpServletRequest request) throws MalformedURLException
MalformedURLException
public String getResultId()
resultId
.
public String getResultType()
resultId
.
public URL getServerBaseHref(HttpServletRequest request) throws MalformedURLException
MalformedURLException
public String getStartIndex()
startIndex
as a String.
public String getTransactionTimeout()
transactionTimeout
public void print(String s)
public void println(String s)
public void release()
public void setAttribute(Collection values)
public void setBaseHref(String v)
baseHref
.
public void setBlockSize(String v)
blockSize
.
public void setConversionType(String conversionType)
conversionType
.
public void setDateFormat(String s)
date format
to use.
public void setDefault(String v)
default
value.
public void setEndIndex(int endIndex)
endIndex
.
public void setEndIndex(String v)
endIndex
.
public void setIsMultiple(boolean b)
isMultiple
.
public void setIsMultiple(String s)
isMultiple
.
public void setName(String v)
name
.
public void setNode(Node node)
public void setNumFormat(String s)
number format
to use.
public void setResultId(String resultId)
resultId
.
public void setResultType(String resultType)
resultType
.
public void setStartIndex(int startIndex)
startIndex
.
public void setStartIndex(String v)
startIndex
.
public void setTransactionTimeout(String timeout)
transactionTimeout
public String toString(Calendar cal) throws JspTagException
JspTagException
- thrown on conversion failure when failOnError is
true.public String toString(Number n) throws JspTagException
JspTagException
- thrown on conversion failure when failOnError is
true.public String toString(Object obj) throws JspTagException
JspTagException
- thrown on conversion failure when failOnError is
true.getDefault()
,
toString(java.util.Calendar)
,
toString(java.lang.Number)
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |