morgand 01/02/21 08:26:50
Modified: jdbc/doc/web index.html
Log:
added docs for new tags- getNumber, getTime, getTimestamp, getDate
Revision Changes Path
1.5 +526 -1 jakarta-taglibs/jdbc/doc/web/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-taglibs/jdbc/doc/web/index.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- index.html 2001/02/05 23:16:43 1.4
+++ index.html 2001/02/21 16:26:48 1.5
@@ -289,9 +289,45 @@
getColumn tag <i>will not</i> create an attribute. Here's a getColumn tag that
creates an Integer request attribute:</p>
+
<pre><%-- Note that the request attribute will be a String --%>
<sql:getColumn position="1" to="someId" scope="request"/></pre>
+</ol>
+
+<p><b>"getNumber" tag</b></p>
+
+<p>When you want more precise control over number formatting, use
+the getNumber tag.</p>
+
+<p>The "format" attribute can be either a pattern as
+accepted by the DecimalFormat constructor or a style: "CURRENCY",
+"PERCENT" or "NUMBER".</p>
+
+<p>The "locale" attribute can have one to three
+components as accepted by the Locale constructor: language,
+country and variant. They are separated by "_". For example:</p>
+
+<p><pre><%-- format a database value as English currency --%>
+<sql:getNumber colName="id" format="CURRENCY" locale="en_GB"/></pre></p>
+
+ If neither the format nor locale attribute is set, output should be
+ identical to getColumn.
+
+<p><b>time tags</b></p>
+
+<p>There are several tags designed for displaying time-related
+data: getTime, getTimestamp and getDate.</p>
+
+<p>The "format" attribute can be either a pattern as
+accepted by SimpleDateFormat or a style: "FULL",
+"LONG", "MEDIUM" or "SHORT". This attribute is optional
+for getTime and getDate, but required for getTimestamp.</p>
+
+<p>The "locale" attribute can have one to three
+components as accepted by the Locale constructor: language,
+country and variant. They are separated by "_".</p>
+
<p><b>disabling looping</b></p>
<p>By default, the body of the result set tag is executed once per row in the
@@ -469,6 +505,22 @@
<TD><A HREF="#getColumn">getColumn</A></TD>
<TD>Gets a column value from the database</TD>
</TR>
+ <TR>
+ <TD><A HREF="#getNumber">getNumber</A></TD>
+ <TD>Formats a number value from the database</TD>
+ </TR>
+ <TR>
+ <TD><A HREF="#getTime">getTime</A></TD>
+ <TD>Formats a java.sql.Time value from the database</TD>
+ </TR>
+ <TR>
+ <TD><A HREF="#getDate">getDate</A></TD>
+ <TD>Formats a java.sql.Date value from the database</TD>
+ </TR>
+ <TR>
+ <TD><A HREF="#getTimestamp">getTimestamp</A></TD>
+ <TD>Formats a java.sql.Timestamp value from the database</TD>
+ </TR>
</TABLE>
<A NAME="reference"><h1>Tag Reference</h1></A>
@@ -1785,7 +1837,7 @@
<TABLE BORDER="0" WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>Tag Body</B></TD>
- <TD WIDTH="80%">JSP</TD>
+ <TD WIDTH="80%">Empty</TD>
</TR>
<TR>
<TD WIDTH="20%"><B>Script Variable</B></TD>
@@ -1854,6 +1906,479 @@
</TR>
</TABLE>
+<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
+ <TR>
+ <TD COLSPAN="2">
+ <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
+ <TR>
+ <TD><B><FONT SIZE="+1"><A
+ NAME="getNumber"> getNumber</A></FONT></B></TD>
+ <TD ALIGN="RIGHT">Availability: version 1.0 </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="2">Similar to getColumn, but provides more precise control over
+ number formatting.
+
+ The "format" attribute can be either a pattern as
+ accepted by the DecimalFormat constructor or a style: "CURRENCY",
+ "PERCENT" or "NUMBER".
+
+ The "locale" attribute can have one to three
+ components as accepted by the Locale constructor: language,
+ country and variant. They are separated by "_".
+
+ If neither the format nor locale attribute is set, output should be
+ identical to getColumn.</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="2%"> </TD>
+ <TD WIDTH="98%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="20%"><B>Tag Body</B></TD>
+ <TD WIDTH="80%">Empty</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Script Variable</B></TD>
+ <TD WIDTH="80%">No</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Restrictions</B></TD>
+ <TD WIDTH="80%">Use within the resultSet tag</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Attributes</B></TD>
+ <TD WIDTH="80%"> </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"> </TD>
+ <TD WIDTH="80%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="40%">Name</TD>
+ <TD WIDTH="20%">Required</TD>
+ <TD WIDTH="40%">Runtime Expression Evaluation</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> position</B></TD>
+ <TD WIDTH="20%"> Yes</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Column position</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> to</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally assign the String to an attribute rather
+ than the JSP output.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> scope</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally change the scope of the attribute designated
+ in "to" (default = page).
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> locale</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Format according to a particular locale.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> format</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Specify a format for the number.
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR><TD WIDTH="20%"><B>Properties</B></TD><TD>None</TD></TR>
+ <TR>
+ <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
+ <TD WIDTH="80%">
+ <br>
+
+<pre><%-- format a database value as English currency --%>
+<sql:getNumber colName="id" format="CURRENCY" locale="en_GB"/></pre>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+</TABLE>
+
+<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
+ <TR>
+ <TD COLSPAN="2">
+ <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
+ <TR>
+ <TD><B><FONT SIZE="+1"><A
+ NAME="getTime"> getTime</A></FONT></B></TD>
+ <TD ALIGN="RIGHT">Availability: version 1.0 </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="2">Similar to getColumn, but provides more precise control over
+ java.sql.Time formatting.
+
+ The "format" attribute can be either a pattern as
+ accepted by SimpleDateFormat or a style: "FULL",
+ "LONG", "MEDIUM" or "SHORT".
+
+ The "locale" attribute can have one to three
+ components as accepted by the Locale constructor: language,
+ country and variant. They are separated by "_".
+
+ If neither the format nor locale attribute is set, output should be
+ identical to getColumn.</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="2%"> </TD>
+ <TD WIDTH="98%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="20%"><B>Tag Body</B></TD>
+ <TD WIDTH="80%">Empty</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Script Variable</B></TD>
+ <TD WIDTH="80%">No</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Restrictions</B></TD>
+ <TD WIDTH="80%">Use within the resultSet tag</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Attributes</B></TD>
+ <TD WIDTH="80%"> </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"> </TD>
+ <TD WIDTH="80%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="40%">Name</TD>
+ <TD WIDTH="20%">Required</TD>
+ <TD WIDTH="40%">Runtime Expression Evaluation</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> position</B></TD>
+ <TD WIDTH="20%"> Yes</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Column position</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> to</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally assign the String to an attribute rather
+ than the JSP output.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> scope</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally change the scope of the attribute designated
+ in "to" (default = page).
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> locale</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Format according to a particular locale.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> format</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Specify a format for the time.
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR><TD WIDTH="20%"><B>Properties</B></TD><TD>None</TD></TR>
+ <TR>
+ <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
+ <TD WIDTH="80%">
+ <br>
+
+<pre><sql:getTime colName="time"/></pre>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+</TABLE>
+
+<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
+ <TR>
+ <TD COLSPAN="2">
+ <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
+ <TR>
+ <TD><B><FONT SIZE="+1"><A
+ NAME="getTimestamp"> getTimestamp</A></FONT></B></TD>
+ <TD ALIGN="RIGHT">Availability: version 1.0 </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="2">Similar to getColumn, but provides more precise control over
+ java.sql.Timestamp formatting.
+
+ The "format" attribute can be either a pattern as
+ accepted by SimpleDateFormat or a style: "FULL",
+ "LONG", "MEDIUM" or "SHORT".
+
+ The "locale" attribute can have one to three
+ components as accepted by the Locale constructor: language,
+ country and variant. They are separated by "_".
+
+ If neither the format nor locale attribute is set, output should be
+ identical to getColumn.</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="2%"> </TD>
+ <TD WIDTH="98%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="20%"><B>Tag Body</B></TD>
+ <TD WIDTH="80%">Empty</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Script Variable</B></TD>
+ <TD WIDTH="80%">No</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Restrictions</B></TD>
+ <TD WIDTH="80%">Use within the resultSet tag</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Attributes</B></TD>
+ <TD WIDTH="80%"> </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"> </TD>
+ <TD WIDTH="80%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="40%">Name</TD>
+ <TD WIDTH="20%">Required</TD>
+ <TD WIDTH="40%">Runtime Expression Evaluation</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> position</B></TD>
+ <TD WIDTH="20%"> Yes</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Column position</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> to</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally assign the String to an attribute rather
+ than the JSP output.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> scope</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally change the scope of the attribute designated
+ in "to" (default = page).
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> locale</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Format according to a particular locale.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> format</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Specify a format for the timestamp.
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR><TD WIDTH="20%"><B>Properties</B></TD><TD>None</TD></TR>
+ <TR>
+ <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
+ <TD WIDTH="80%">
+ <br>
+
+<pre><sql:getTimestamp colName="time"/></pre>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+</TABLE>
+
+<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
+ <TR>
+ <TD COLSPAN="2">
+ <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
+ <TR>
+ <TD><B><FONT SIZE="+1"><A
+ NAME="getDate"> getDate</A></FONT></B></TD>
+ <TD ALIGN="RIGHT">Availability: version 1.0 </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="2">Similar to getColumn, but provides more precise control over
+ java.sql.Date formatting.
+
+ The "format" attribute can be either a pattern as
+ accepted by SimpleDateFormat or a style: "FULL",
+ "LONG", "MEDIUM" or "SHORT". It is required.
+
+ The "locale" attribute can have one to three
+ components as accepted by the Locale constructor: language,
+ country and variant. They are separated by "_".</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="2%"> </TD>
+ <TD WIDTH="98%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="20%"><B>Tag Body</B></TD>
+ <TD WIDTH="80%">Empty</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Script Variable</B></TD>
+ <TD WIDTH="80%">No</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Restrictions</B></TD>
+ <TD WIDTH="80%">Use within the resultSet tag</TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"><B>Attributes</B></TD>
+ <TD WIDTH="80%"> </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="20%"> </TD>
+ <TD WIDTH="80%">
+ <TABLE BORDER="0" WIDTH="100%">
+ <TR>
+ <TD WIDTH="40%">Name</TD>
+ <TD WIDTH="20%">Required</TD>
+ <TD WIDTH="40%">Runtime Expression Evaluation</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> position</B></TD>
+ <TD WIDTH="20%"> Yes</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Column position</TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> to</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally assign the String to an attribute rather
+ than the JSP output.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> scope</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> No</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Optionally change the scope of the attribute designated
+ in "to" (default = page).
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> locale</B></TD>
+ <TD WIDTH="20%"> No</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Format according to a particular locale.
+ </TD>
+ </TR>
+ <TR BGCOLOR="#CCCCCC">
+ <TD WIDTH="40%"><B> format</B></TD>
+ <TD WIDTH="20%"> Yes</TD>
+ <TD WIDTH="40%"> Yes</TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="3">Specify a format for the timestamp.
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR><TD WIDTH="20%"><B>Properties</B></TD><TD>None</TD></TR>
+ <TR>
+ <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
+ <TD WIDTH="80%">
+ <br>
+
+<pre><sql:getDate colName="time" format="FULL"/></pre>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+</TABLE>
<A NAME="examples"><h1>Examples</h1></A>
<P>See the example application jdbc-examples.war for examples of the usage