JSP CUSTOM TAG LIBRARIES


Formatting JSP content
The following JSP tags contain a format attribute:

attachmentlist, authors, created, formula, input, item, lastaccessed, lastmodified, textarea, validatesummary, viewitem

You specify the format to use to display the content of these tags on a JSP page using one or more keywords. The following table defines the available keywords, the short hand code you use to specify a keyword in a format attribute, the data type of each, and the parameters, if any, to supply with each:
KeywordShort handData typeParameterExample
FULLFUDate formatMonday, June 12, 2000 3:00:30 PM EDT
LONGLODate formatJune 12, 2000 3:00:30 PM EDT
MEDIUMMEDate formatJun 12, 2000 3:00:30 PM
SHORTSHDate format6/12/00 3:00 PM
DATEDADate formatFULL, LONG, MEDIUM, SHORT, (Blank)If you specify: DATE=FULL, displays as:

Monday, June 12, 2000

TIMETIDate formatFULL, LONG, MEDIUM, SHORT, (Blank)If you specify: TIME=SHORT, displays as:

3:00 PM

CURRENCY$Number format1234.56
PERCENT%Number format123,456%
LOWERLOWString formathello world
UPPERUPString formatHELLO WORLD
RAWModifierPasses the resulting text through as is.

Note Use this keyword whenever you include HTML tags in the body of a JSP tag to prevent the HTML angle brackets from being read as less than (<) and greater than (>) symbols.

HTMLModifierEscapes the resulting text for a HTML page. For example, the less-than sign (<) is translated to &lt;. (This keyword is the default if no modifier is specified.)
XMLModifierEscapes the resulting text for a XML document.
JAVASCRIPTModifierEscapes the resulting text for inclusion in a JavaScript string. For example, translates a quotation mark (") to a slash followed by a quotation mark(/"), which indicates that the quotation mark should display on the page.
URLModifierEscapes the resulting text for inclusion in a URL. For example, a blank space (" ") is translated to a plus sign (+), removing all spaces from the query string.
QUOTEDModifierSame as JAVASCRIPT
FIRSTFIList modifierReturns only the first item in a multi-value field.
LASTLAList modifierReturns only the last item in a multi-value field.
<LI>List modifierPlaces each item between opening (<LI>) and closing (</LI>) HTML list tags, which would display each item of a multi-value field on a separate line in a list.
<OPTION>List modifierPlaces each item between opening (<OPTION>) and closing (</OPTION>) HTML option tags, which would display each item of a multi-value field as a an option in a selection control or menu list.
SEPARATORSEList modifierStringFor a multi-value field, the items are separated by the string specified in the parameter.
MIN_INTEGERMIN_INTNumber formatNumber
MAX_INTEGERMAX_INTNumber formatNumber
MIN_FRACTIONMINNumber formatNumber
MAX_FRACTIONMAXNumber formatNumber

See Also