You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2010/06/29 17:07:46 UTC
svn commit: r959005 [5/5] - in /tcl/rivet/trunk: ./ doc/ doc/html/ doc/xml/
rivet/packages/form/
Modified: tcl/rivet/trunk/doc/html/session_package.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/session_package.html?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/session_package.html (original)
+++ tcl/rivet/trunk/doc/html/session_package.html Tue Jun 29 15:07:45 2010
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Session Package</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="prev" href="diodisplay_package.html" title="DIODisplay"><link rel="next" href="help.html" title="Resources - How to Get Help"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Session Package</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diodisplay_package.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="help.html"><img src="images/next.png" alt="Next"></a></td></tr><
/table></div><div class="section" title="Session Package"><div class="titlepage"><div><div><hr><h2 class="title" style="clear: both"><a name="session_package"></a>Session Package</h2></div></div></div><div class="section" title="Introduction"><div class="titlepage"><div><div><h3 class="title"><a name="id3002697"></a>Introduction</h3></div></div></div><p style="width:90%">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Session Package</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="prev" href="diodisplay_package.html" title="DIODisplay"><link rel="next" href="form.html" title="Form: An HTML Form Fields Generation Utility"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Session Package</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diodisplay_package.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="form.html"><img src="images/next.png" alt="Next
"></a></td></tr></table></div><div class="section" title="Session Package"><div class="titlepage"><div><div><hr><h2 class="title" style="clear: both"><a name="session_package"></a>Session Package</h2></div></div></div><div class="section" title="Introduction"><div class="titlepage"><div><div><h3 class="title"><a name="id369423"></a>Introduction</h3></div></div></div><p style="width:90%">
This is session management code. It provides an interface
to allow you to generate and track a browser's visit as a
"session", giving you a unique session ID and an interface
@@ -25,7 +25,7 @@
All DB interfacing is done through DIO, though, so it
should be relatively easy to add support for other
databases.
- </p></div><div class="section" title="Preparing To Use It"><div class="titlepage"><div><div><h3 class="title"><a name="id3002712"></a>Preparing To Use It</h3></div></div></div><p style="width:90%">Create the tables in your SQL server. With Postgres,
+ </p></div><div class="section" title="Preparing To Use It"><div class="titlepage"><div><div><h3 class="title"><a name="id369758"></a>Preparing To Use It</h3></div></div></div><p style="width:90%">Create the tables in your SQL server. With Postgres,
do a <span style="font-family:monospace"><span class="command"><strong>psql www</strong></span></span> or whatever DB you
connect as, then a backslash-i on
<code class="filename">session-create.sql</code></p><p style="width:90%">(If you need to delete the tables, use <code class="filename">session-drop.sql</code>)</p><p style="width:90%">The session code by default requires a DIO handle
@@ -33,7 +33,7 @@
overridden). We get it by doing a</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">
RivetServerConf ChildInitScript "package require DIO"
RivetServerConf ChildInitScript "::DIO::handle Postgresql DIO -user www"
- </pre></div><div class="section" title="Example Usage"><div class="titlepage"><div><div><h3 class="title"><a name="id3002761"></a>Example Usage</h3></div></div></div><p style="width:90%">In your httpd.conf, add:</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">RivetServerConf ChildInitScript "package require Session; Session SESSION"</pre><p style="width:90%">
+ </pre></div><div class="section" title="Example Usage"><div class="titlepage"><div><div><h3 class="title"><a name="id369804"></a>Example Usage</h3></div></div></div><p style="width:90%">In your httpd.conf, add:</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">RivetServerConf ChildInitScript "package require Session; Session SESSION"</pre><p style="width:90%">
This tells Rivet you want to create a session object named
SESSION in every child process Apache creates.</p><p style="width:90%">
You can configure the session at this point using numerous
@@ -54,7 +54,7 @@
additional requests are received during the session, all
under the control of the key-value pairs controlling the
session object.
- </p></div><div class="section" title="Using Sessions From Your Code"><div class="titlepage"><div><div><h3 class="title"><a name="id3002827"></a>Using Sessions From Your Code</h3></div></div></div><p style="width:90%">The main methods your code will use are:</p><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">SESSION</span> <span style="font-weight:bold ; font-family:monospace">id</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
+ </p></div><div class="section" title="Using Sessions From Your Code"><div class="titlepage"><div><div><h3 class="title"><a name="id369860"></a>Using Sessions From Your Code</h3></div></div></div><p style="width:90%">The main methods your code will use are:</p><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">SESSION</span> <span style="font-weight:bold ; font-family:monospace">id</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
After doing a <span style="font-family:monospace"><span class="command"><strong>SESSION activate</strong></span></span>,
this will return a 32-byte ASCII-encoded random
hexadecimal string. Every time this browser comes
@@ -81,7 +81,7 @@
none was set. (Status is set to the DIO error that
occurred, it can be fetched using the status
method.)
- </div></div></dd></dl></div></div><div class="section" title="Session Configuration Options"><div class="titlepage"><div><div><h3 class="title"><a name="id3003035"></a>Session Configuration Options</h3></div></div></div><p style="width:90%">The following key-value pairs can be specified when a
+ </div></div></dd></dl></div></div><div class="section" title="Session Configuration Options"><div class="titlepage"><div><div><h3 class="title"><a name="id370057"></a>Session Configuration Options</h3></div></div></div><p style="width:90%">The following key-value pairs can be specified when a
session object (like SESSION above) is created:</p><div class="variablelist"><dl><dt><span class="term">sessionLifetime</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">how many seconds the session will live for.
7200 == 2 hours
</div></div></dd><dt><span class="term">sessionRefreshInterval</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
@@ -134,7 +134,7 @@
file handle that debugging messages will be written
to (default
<code class="varname">stdout</code>)
- </div></div></dd></dl></div></div><div class="section" title="Session Methods"><div class="titlepage"><div><div><h3 class="title"><a name="id3003284"></a>Session Methods</h3></div></div></div><p style="width:90%">
+ </div></div></dd></dl></div></div><div class="section" title="Session Methods"><div class="titlepage"><div><div><h3 class="title"><a name="id370285"></a>Session Methods</h3></div></div></div><p style="width:90%">
The following methods can be invoked to find out
information about the current session, store and fetch
server data identified with this session, etc:
@@ -173,7 +173,7 @@
If they don't have one or it isn't valid (timed out,
etc), create a session and drop a cookie on
them.
- </div></div></dd></dl></div></div><div class="section" title="Getting Additional Randomness From The Entropy File"><div class="titlepage"><div><div><h3 class="title"><a name="id3003524"></a>Getting Additional Randomness From The Entropy File</h3></div></div></div><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">RivetServerConf ChildInitScript "Session SESSION -entropyFile /dev/urandom \
+ </div></div></dd></dl></div></div><div class="section" title="Getting Additional Randomness From The Entropy File"><div class="titlepage"><div><div><h3 class="title"><a name="id370511"></a>Getting Additional Randomness From The Entropy File</h3></div></div></div><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">RivetServerConf ChildInitScript "Session SESSION -entropyFile /dev/urandom \
-entropyLength 10 -debugMode 1"</pre><p style="width:90%">
This options say we want to get randomness from an entropy
file (random data pseudo-device) of /dev/urandom, to get ten
@@ -181,4 +181,4 @@
on debug mode, which will cause the SESSION object to output
all manner of debugging information as it does stuff. This
has been tested on FreeBSD and appears to work.
- </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="diodisplay_package.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="help.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">DIODisplay </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> Resources - How to Get Help</td></tr></table></div></body></html>
+ </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="diodisplay_package.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="form.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">DIODisplay </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> Form: An HTML Form Fields Generation Utility</td></tr></table></div></body></html>
Modified: tcl/rivet/trunk/doc/html/tcl_packages.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/tcl_packages.html?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/tcl_packages.html (original)
+++ tcl/rivet/trunk/doc/html/tcl_packages.html Tue Jun 29 15:07:45 2010
@@ -1,7 +1,11 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Rivet Tcl Packages</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="prev" href="examples.html" title="Examples and Usage"><link rel="next" href="dio.html" title="DIO - Database Interface Objects"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Tcl Packages</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="examples.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="dio.html"><img src="images/next.png" alt="Next"></a></td></tr></ta
ble></div><div class="section" title="Rivet Tcl Packages"><div class="titlepage"><div><div><hr><h2 class="title" style="clear: both"><a name="tcl_packages"></a>Rivet Tcl Packages</h2></div></div></div><p style="width:90%">
In addition to the core Apache module, Rivet provides a number
of Tcl packages that include potentially useful code.
- </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">commserver is a package providing a server that can be
- used for IPC. Still experimental. Requires the comm package
- from tcllib.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">dio is a database abstraction layer.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">dtcl is a compatibility package for mod_dtcl
- applications.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">form - for creating forms.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">rivet - some additional, useful routines.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">tclrivet</div></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="examples.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="dio.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Examples and Usage </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> DIO - Database Interface Objects</td></tr></table></d
iv></body></html>
+ </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">
+ commserver is a package providing a server that can be
+ used for IPC. Still experimental. Requires the comm package
+ from tcllib.
+ </div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">dio is a database abstraction layer.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">
+ dtcl is a compatibility package for mod_dtcl
+ applications.
+ </div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">form - for creating forms.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">rivet - some additional, useful routines.</div></li><li class="listitem"><div style="margin-bottom:1.5ex ; padding .5ex">tclrivet</div></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="examples.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="dio.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Examples and Usage </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> DIO - Database Interface Objects</td></tr></table></div></body><
/html>
Modified: tcl/rivet/trunk/doc/html/unescape_string.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/unescape_string.html?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/unescape_string.html (original)
+++ tcl/rivet/trunk/doc/html/unescape_string.html Tue Jun 29 15:07:45 2010
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>unescape_string</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="escape_shell_command.html" title="escape_shell_command"><link rel="next" href="apache_log_error.html" title="apache_log_error"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">unescape_string</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="escape_shell_command.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" hr
ef="apache_log_error.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry" title="unescape_string"><div class="refentry.separator"><hr></div><a name="unescape_string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>unescape_string — unescape escaped characters in a string.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">unescape_string</span> ?<span style="font-family:monospace; font-weight: bold;">string</span>?</div></div></div><div class="refsect1" title="Description"><a name="id2985747"></a><h2>Description</h2><p style="width:90%">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>unescape_string</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="escape_shell_command.html" title="escape_shell_command"><link rel="next" href="apache_log_error.html" title="apache_log_error"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">unescape_string</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="escape_shell_command.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" hr
ef="apache_log_error.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry" title="unescape_string"><div class="refentry.separator"><hr></div><a name="unescape_string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>unescape_string — unescape escaped characters in a string.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">unescape_string</span> ?<span style="font-family:monospace; font-weight: bold;">string</span>?</div></div></div><div class="refsect1" title="Description"><a name="id353622"></a><h2>Description</h2><p style="width:90%">
Scans through each character in the specified string looking
for escaped character sequences (characters containing a
percent sign and two hexadecimal characters, unescaping them
Modified: tcl/rivet/trunk/doc/html/upgrading.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/upgrading.html?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/upgrading.html (original)
+++ tcl/rivet/trunk/doc/html/upgrading.html Tue Jun 29 15:07:45 2010
@@ -5,8 +5,8 @@
compatibility was not a primary goal when creating Rivet, but we
do provide this information which may be of use to those wishing
to upgrade from mod_dtcl or NWS installations.
- </p><div class="section" title="mod_dtcl"><div class="titlepage"><div><div><h3 class="title"><a name="id3004523"></a>mod_dtcl</h3></div></div></div><p style="width:90%">
+ </p><div class="section" title="mod_dtcl"><div class="titlepage"><div><div><h3 class="title"><a name="id375493"></a>mod_dtcl</h3></div></div></div><p style="width:90%">
Rivet was originally based on the dtcl code, but it has
changed (improved!) quite a bit. The concepts remain the
same, but many of the commands have changed.
- </p></div><div class="section" title="NeoWebScript"><div class="titlepage"><div><div><h3 class="title"><a name="id3004339"></a>NeoWebScript</h3></div></div></div><p style="width:90%">TODO</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Rivet Internals </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
+ </p></div><div class="section" title="NeoWebScript"><div class="titlepage"><div><div><h3 class="title"><a name="id375504"></a>NeoWebScript</h3></div></div></div><p style="width:90%">TODO</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Rivet Internals </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
Modified: tcl/rivet/trunk/doc/html/upload.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/upload.html?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/upload.html (original)
+++ tcl/rivet/trunk/doc/html/upload.html Tue Jun 29 15:07:45 2010
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>upload</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="var.html" title="var"><link rel="next" href="load_response.html" title="load_response"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">upload</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="var.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="load_response.html"><img src="images/next.png" alt="Next"></a></td></tr
></table></div><div class="refentry" title="upload"><div class="refentry.separator"><hr></div><a name="upload"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>upload — handle a file uploaded by a client.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">upload</span> (<span style="font-family:monospace; font-weight: bold;">channel</span> | <span style="font-family:monospace; font-weight: bold;">save</span> | <span style="font-family:monospace; font-weight: bold;">data</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">size</span> | <span style="font-family:monospace; font-weight: bold;">type</span> | <span style="font-family:monospace; font-w
eight: bold;">filename</span>)</div></div></div><div class="refsect1" title="Description"><a name="id2983850"></a><h2>Description</h2><p style="width:90%">The upload command is for file upload manipulation.
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>upload</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="var.html" title="var"><link rel="next" href="load_response.html" title="load_response"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">upload</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="var.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="load_response.html"><img src="images/next.png" alt="Next"></a></td></tr
></table></div><div class="refentry" title="upload"><div class="refentry.separator"><hr></div><a name="upload"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>upload — handle a file uploaded by a client.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">upload</span> (<span style="font-family:monospace; font-weight: bold;">channel</span> | <span style="font-family:monospace; font-weight: bold;">save</span> | <span style="font-family:monospace; font-weight: bold;">data</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">size</span> | <span style="font-family:monospace; font-weight: bold;">type</span> | <span style="font-family:monospace; font-w
eight: bold;">filename</span>)</div></div></div><div class="refsect1" title="Description"><a name="id351792"></a><h2>Description</h2><p style="width:90%">The upload command is for file upload manipulation.
See the relevant Apache Directives to further configure the
behavior of this Rivet feature.
</p><div class="variablelist"><dl><dt><span class="term">
Modified: tcl/rivet/trunk/doc/html/var.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/var.html?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/var.html (original)
+++ tcl/rivet/trunk/doc/html/var.html Tue Jun 29 15:07:45 2010
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>var</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="next" href="upload.html" title="upload"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">var</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commands.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="upload.html"><img src="images/next.png" alt="Next"><
/a></td></tr></table></div><div class="refentry" title="var"><a name="var"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>var, var_qs, var_post — get the value of a form variable.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-
spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_qs</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_post</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-
weight: bold;">all</span>)</div></div></div><div class="refsect1" title="Description"><a name="id2983500"></a><h2>Description</h2><p style="width:90%">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>var</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="next" href="upload.html" title="upload"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">var</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commands.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="upload.html"><img src="images/next.png" alt="Next"><
/a></td></tr></table></div><div class="refentry" title="var"><a name="var"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>var, var_qs, var_post — get the value of a form variable.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-
spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_qs</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_post</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-
weight: bold;">all</span>)</div></div></div><div class="refsect1" title="Description"><a name="id351454"></a><h2>Description</h2><p style="width:90%">
The <span style="font-family:monospace"><span class="command"><strong>var</strong></span></span> command retrieves information
about GET or POST variables sent to the script via client
request. It treats both GET and POST variables the same,
Modified: tcl/rivet/trunk/doc/rivet.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/rivet.xml?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/rivet.xml (original)
+++ tcl/rivet/trunk/doc/rivet.xml Tue Jun 29 15:07:45 2010
@@ -2,27 +2,28 @@
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/committees/docbook/xml/4.1.2/docbookx.dtd" [
- <!ENTITY hello.rvt SYSTEM "examples/hello.rvt" >
- <!ENTITY table.rvt SYSTEM "examples/table.rvt" >
- <!ENTITY vars.html SYSTEM "examples/vars.html" >
- <!ENTITY vars.rvt SYSTEM "examples/vars.rvt" >
- <!ENTITY upload.html SYSTEM "examples/upload.html" >
- <!ENTITY upload.rvt SYSTEM "examples/upload.rvt" >
- <!ENTITY download.tcl SYSTEM "examples/download.tcl" >
+ <!ENTITY hello.rvt SYSTEM "examples/hello.rvt" >
+ <!ENTITY table.rvt SYSTEM "examples/table.rvt" >
+ <!ENTITY vars.html SYSTEM "examples/vars.html" >
+ <!ENTITY vars.rvt SYSTEM "examples/vars.rvt" >
+ <!ENTITY upload.html SYSTEM "examples/upload.html" >
+ <!ENTITY upload.rvt SYSTEM "examples/upload.rvt" >
+ <!ENTITY download.tcl SYSTEM "examples/download.tcl" >
<!ENTITY rivet_web_service.tcl SYSTEM "examples/rivet_web_service.tcl" >
- <!ENTITY intro.xml SYSTEM "xml/intro.xml" >
- <!ENTITY install.xml SYSTEM "xml/install.xml" >
- <!ENTITY directives.xml SYSTEM "xml/directives.xml" >
- <!ENTITY commands.xml SYSTEM "xml/commands.xml" >
- <!ENTITY examples.xml SYSTEM "xml/examples.xml" >
- <!ENTITY packages.xml SYSTEM "xml/packages.xml" >
- <!ENTITY dio.xml SYSTEM "xml/dio.xml" >
- <!ENTITY diodisplay.xml SYSTEM "xml/diodisplay.xml" >
- <!ENTITY session.xml SYSTEM "xml/session.xml" >
- <!ENTITY help.xml SYSTEM "xml/help.xml" >
- <!ENTITY internals.xml SYSTEM "xml/internals.xml" >
- <!ENTITY upgrade.xml SYSTEM "xml/upgrade.xml" >
+ <!ENTITY intro.xml SYSTEM "xml/intro.xml" >
+ <!ENTITY install.xml SYSTEM "xml/install.xml" >
+ <!ENTITY directives.xml SYSTEM "xml/directives.xml" >
+ <!ENTITY commands.xml SYSTEM "xml/commands.xml" >
+ <!ENTITY examples.xml SYSTEM "xml/examples.xml" >
+ <!ENTITY packages.xml SYSTEM "xml/packages.xml" >
+ <!ENTITY dio.xml SYSTEM "xml/dio.xml" >
+ <!ENTITY diodisplay.xml SYSTEM "xml/diodisplay.xml" >
+ <!ENTITY session.xml SYSTEM "xml/session.xml" >
+ <!ENTITY form.xml SYSTEM "xml/form.xml" >
+ <!ENTITY help.xml SYSTEM "xml/help.xml" >
+ <!ENTITY internals.xml SYSTEM "xml/internals.xml" >
+ <!ENTITY upgrade.xml SYSTEM "xml/upgrade.xml" >
]>
<!--
@@ -105,13 +106,16 @@
<!-- Sessions -->
&session.xml;
- <!-- Help -->
- &help.xml;
+ <!-- Form -->
+ &form.xml;
- <!-- Internals -->
- &internals.xml;
+ <!-- Help -->
+ &help.xml;
- <!-- Upgrade -->
- &upgrade.xml;
+ <!-- Internals -->
+ &internals.xml;
+
+ <!-- Upgrade -->
+ &upgrade.xml;
</article>
Modified: tcl/rivet/trunk/doc/xml/commands.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/commands.xml?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/commands.xml (original)
+++ tcl/rivet/trunk/doc/xml/commands.xml Tue Jun 29 15:07:45 2010
@@ -340,40 +340,42 @@
</refsynopsisdiv>
<refsect1>
- <title>Description</title>
- Load any form variables passed to this page into an
- array. If <command>load_response</command> is called without
- arguments the array <option>response</option> is created in
- the scope of the caller. If the variables var1,var2,var3...
- having values val1,val2,val3... are passed to the page, the
- resulting array will be a collection mapping var1,var2,var3...
- to their corresponding values. <command>load_response</command>
- was inspired by the same NeoWebScript procedure in the way
- it deals with multiple assignments: if a variable
- is assigned more than once the corresponding array element will be a
- list of the values for the variable. This can be useful in the case
- of forms with checkbox options that are given the same name.
- Calling <command>load_response</command> several times for the same
- array results in adding more values to the array at every call.
- When needed it is left to the caller to empty the array between
- two subsequent calls.
+ <title>Description</title>
+ <para>
+ Load any form variables passed to this page into an
+ array. If <command>load_response</command> is called without
+ arguments the array <option>response</option> is created in
+ the scope of the caller. If the variables var1,var2,var3...
+ having values val1,val2,val3... are passed to the page, the
+ resulting array will be a collection mapping var1,var2,var3...
+ to their corresponding values. <command>load_response</command>
+ was inspired by the same NeoWebScript procedure in the way
+ it deals with multiple assignments: if a variable
+ is assigned more than once the corresponding array element will be a
+ list of the values for the variable. This can be useful in the case
+ of forms with checkbox options that are given the same name.
+ Calling <command>load_response</command> several times for the same
+ array results in adding more values to the array at every call.
+ When needed it is left to the caller to empty the array between
+ two subsequent calls.
+ </para>
</refsect1>
</refentry>
<refentry id="load_headers">
<refnamediv>
- <refname>load_headers</refname>
- <refpurpose>get client request's headers.</refpurpose>
+ <refname>load_headers</refname>
+ <refpurpose>get client request's headers.</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <cmdsynopsis>
- <command>load_headers</command>
- <arg><replaceable>array_name</replaceable></arg>
- </cmdsynopsis>
+ <cmdsynopsis>
+ <command>load_headers</command>
+ <arg><replaceable>array_name</replaceable></arg>
+ </cmdsynopsis>
</refsynopsisdiv>
- <refsect1>
+ <refsect1>
<title>Description</title>
<para>
Load the headers that come from a client request into the
@@ -825,8 +827,8 @@
<refentry id="escape_string">
<refnamediv>
- <refname>escape_string</refname>
- <refpurpose>convert a string into escaped characters.</refpurpose>
+ <refname>escape_string</refname>
+ <refpurpose>convert a string into escaped characters.</refpurpose>
</refnamediv>
<refsynopsisdiv>
Modified: tcl/rivet/trunk/doc/xml/dio.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/dio.xml?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/dio.xml (original)
+++ tcl/rivet/trunk/doc/xml/dio.xml Tue Jun 29 15:07:45 2010
@@ -6,21 +6,21 @@
<refpurpose>Database Interface Objects</refpurpose>
</refnamediv>
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>::DIO::handle</command>
- <arg choice="plain"><replaceable>interface</replaceable></arg>
- <arg choice="opt"><replaceable>objectName</replaceable></arg>
- <group choice="opt">
- <arg>-option</arg>
- <arg><replaceable>option</replaceable></arg>
- <arg>-option</arg>
- <arg><replaceable>option</replaceable></arg>
- <arg>...</arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
- <refsect1>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>::DIO::handle</command>
+ <arg choice="plain"><replaceable>interface</replaceable></arg>
+ <arg choice="opt"><replaceable>objectName</replaceable></arg>
+ <group choice="opt">
+ <arg>-option</arg>
+ <arg><replaceable>option</replaceable></arg>
+ <arg>-option</arg>
+ <arg><replaceable>option</replaceable></arg>
+ <arg>...</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
<title>Description</title>
<para>
<command>DIO</command> is designed to be a generic,
Added: tcl/rivet/trunk/doc/xml/form.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/form.xml?rev=959005&view=auto
==============================================================================
--- tcl/rivet/trunk/doc/xml/form.xml (added)
+++ tcl/rivet/trunk/doc/xml/form.xml Tue Jun 29 15:07:45 2010
@@ -0,0 +1,538 @@
+<!-- $Id: -->
+
+<section id="form">
+ <title>Form: An HTML Form Fields Generation Utility</title>
+ <refentry id="form_package">
+ <refnamediv>
+ <refname>form</refname>
+ <refpurpose>
+ The <command>form</command> packages creates a form object that can be manipulated
+ to generate HTML forms
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>form</command>
+ <arg choice="plain"><replaceable>form_name</replaceable></arg>
+ <group choice="opt">
+ <arg>-option1</arg>
+ <arg><replaceable>option value 1</replaceable></arg>
+ <arg>-option2</arg>
+ <arg><replaceable>option value 2</replaceable></arg>
+ <arg>...</arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
+ <para>
+ The <command>form</command> package is a utility to generating html forms. A <command>form</command>
+ object command saves the programmer from typing the cumbersome html code of input elements,
+ working out a solution for better standardization and readability of the code.
+ <command>form</command> requires that just the basic information of interest to the code are
+ typed, greatly simplyfing the development of forms.
+ A <command>form</command> object has specialized menthods to generate all the standard
+ input fields, i.e. text, password, hidden, generic button, submit or reset buttons and
+ image. <command>form</command> creates select input fields, radiobutton and checkbox
+ boolean options groups. Also new inputs introduced with HTML5 are supported: color, date,
+ datetime, datetime-local, email, file, month, number, range, search, tel, time, url, week.
+ </para>
+ <para>
+ Other input elements can be generated using the general purpose 'field' method.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Form Object subcommands</title>
+ <para>
+ Form Objects are Tcl commands that need subcommands to invoke specific actions on an object.
+ They have a general syntax that follow this scheme:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ form_object <arg choice="plain">subcommand</arg> <arg><replaceable>name</replaceable></arg>
+ <arg>-option1</arg> <arg>value1</arg> <arg>-option2</arg> <arg>value2</arg>
+ </cmdsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Where <arg>name</arg> is to become the value of a 'name' attribute in input field tag. The list
+ of switches that follows <arg>name</arg> is copied into the a tag as attribute="value" pairs.
+ Some subcommand (e.g. radiobuttons and checkboxes) treat specific options in a way that fits
+ the specific organization of these fields.
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>Options</title>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">-method</arg>
+ <arg choice="opt">post|get</arg>
+ </cmdsynopsis>
+ <para>
+ The method to be used to encode the form data. Possible values are get or post
+ </para>
+ <note>
+ At the time of writing only the 'get' method is implemented
+ </note>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">-name</arg>
+ <arg choice="opt"><replaceable>form_name</replaceable></arg>
+ </cmdsynopsis>
+ <para>
+ a name for the form being generated: this value becomes the value of the
+ attribute 'name' in the <form> tag.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">-defaults</arg>
+ <arg choice="opt"><replaceable>default_values</replaceable></arg>
+ </cmdsynopsis>
+ <para>
+ an array of default values to be assigned to the fields of the form.
+ Every name in the array is matched with an input field, when
+ a given field gets added to the form it is initialized with the
+ value of the corresponding variable in the array.
+ This option works well in conjuction with the
+ <command>load_response</command> command of Rivet when default values
+ come from another form.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">-action</arg>
+ <arg choice="opt"><replaceable>URL to form data processing procedure</replaceable></arg>
+ </cmdsynopsis>
+ <para>
+ The URL to the procedure data are being sent to. If no <arg>-action</arg> switch is specified
+ the data are sent to the form's URL.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </refsect1>
+ <refsect1>
+ <variablelist>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">start</arg>
+ </cmdsynopsis>
+ <para>
+ generate the <form> tag with all of its arguments.
+ This command must be called as first in the form generation
+ process. The following is a sample of code creating a form named 'formname' whose data will
+ be sent with menthod GET and initialized with data stored in array 'response'
+ </para>
+ <programlisting>
+form myform -defaults response -method get -name formname
+myform start
+myform text text_entry -size 20
+myform select option_selected -values {opt1 opt2 opt3 opt4}
+myform submit submit -value Search
+myform end</programlisting>
+ <para>
+ The code collects the input field values and send them through GET
+ method to the same form URL for further processing. Use the <arg>-action</arg>
+ switch to specify a different URL to process the data
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">end</arg>
+ </cmdsynopsis>
+ <para>
+ generate the </form> closing tag. This command must
+ be called as last in the form generation process
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">field</arg>
+ <arg>type</arg>
+ <arg>name</arg>
+ <arg choice="opt">args</arg>
+ </cmdsynopsis>
+ <para>
+ emit a field of the given <arg>type</arg> and <arg>name</arg>,
+ including any default key-value pairs defined for this field
+ type and optional key-value pairs included with the statement
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">text</arg>
+ <arg>name</arg>
+ <arg choice="opt">args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits a text input field of the form
+ <input type="text" name="<arg>name</arg>" .../>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">password</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Same as text, but the input is kept hidden as usual for
+ passwords
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">hidden</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ hidden input element: the classical field to be embedded in form to
+ pass status variables.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">submit</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ emits the code for a classical HTML submit button. Example: the following
+ code
+ </para>
+ <para>
+ <programlisting>
+form myform -defaults response -method get -name feedsearch
+myform start
+myform submit submit -value Search</programlisting>
+ </para>
+ <para>
+ Would emit a form like this
+ </para>
+ <programlisting>
+<form...>
+<input type="submit" name="submit" value="Search" />
+</form></programlisting>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">button</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ emits the code for a button field having <arg>name</arg> as name
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">reset</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Classical HTML reset button that brings the input fields
+ back to their initial values
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">image</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an image input field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">checkbox</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits a checkbox input field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">radio</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits a radiobutton input field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">color</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "color" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">date</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "date" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">datetime</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "datetime" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">datetime_local</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "datetime_local" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">email</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "email" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">file</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "file" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">month</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "month" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">number</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "number" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">range</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "range" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">search</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "search" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">tel</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "tel" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">time</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "time" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">url</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "url" form field
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">week</arg>
+ <arg>name</arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ Emits an HTML 5 "week" form field
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <listitem>
+ <cmdsynopsis>
+ <arg choice="plain">name</arg>
+ <arg>-values <replaceable>values list</replaceable></arg>
+ <arg>-labels <replaceable>labels list</replaceable></arg>
+ <arg>args</arg>
+ </cmdsynopsis>
+ <para>
+ the <command>radiobutton</command> creates a whole radiobutton group
+ with the values and labels specified in the argument list. If no <arg>-labels</arg> switch is
+ passed to the subcommand the values are printed as labels of the radiobutton. Example:
+ </para>
+ <programlisting>
+form myform -defaults response -method get -name formname
+myform start
+myform text text_entry -size 20
+myform radiobuttons fruit -values {big medium small} \
+ -labels {Watermelon Orange Strawberry} \
+ -class myradiobuttonclass
+myform submit submit -value Search
+myform end</programlisting>
+ <para>
+ will generate the following HTML code.
+ </para>
+ <programlisting>
+<input type="radio" name="fruit" class="myradiobuttonclass" value="big" />Watermelon
+<input type="radio" name="fruit" class="myradiobuttonclass" value="medium" />Orange
+<input type="radio" name="fruit" class="myradiobuttonclass" value="small" />Strawberry
+</programlisting>
+ <para>
+ if the 'response' array has a variable for the name 'fruit' the corresponding
+ radiobutton field is automatically checked. The options <arg>values</arg> and <arg>labels</arg>
+ are used internally and don't get into the tag attributes. If a <arg>labels</arg>
+ switch is not given labels are generated using the <arg>values</arg> argument.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ </refentry>
+
+</section>
Modified: tcl/rivet/trunk/doc/xml/packages.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/packages.xml?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/packages.xml (original)
+++ tcl/rivet/trunk/doc/xml/packages.xml Tue Jun 29 15:07:45 2010
@@ -7,30 +7,34 @@
<itemizedlist>
<listitem>
- <para>commserver is a package providing a server that can be
- used for IPC. Still experimental. Requires the comm package
- from tcllib.</para>
+ <para>
+ commserver is a package providing a server that can be
+ used for IPC. Still experimental. Requires the comm package
+ from tcllib.
+ </para>
</listitem>
<listitem>
- <para>dio is a database abstraction layer.</para>
+ <para>dio is a database abstraction layer.</para>
</listitem>
<listitem>
- <para>dtcl is a compatibility package for mod_dtcl
- applications.</para>
+ <para>
+ dtcl is a compatibility package for mod_dtcl
+ applications.
+ </para>
</listitem>
<listitem>
- <para>form - for creating forms.</para>
+ <para>form - for creating forms.</para>
</listitem>
<listitem>
- <para>rivet - some additional, useful routines.</para>
+ <para>rivet - some additional, useful routines.</para>
</listitem>
<listitem>
- <para>tclrivet</para>
+ <para>tclrivet</para>
</listitem>
</itemizedlist>
</section>
Modified: tcl/rivet/trunk/rivet/packages/form/form.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/form/form.tcl?rev=959005&r1=959004&r2=959005&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/form/form.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/form/form.tcl Tue Jun 29 15:07:45 2010
@@ -102,7 +102,7 @@ package provide form 1.0
foreach {var val} $list {
set var [string range [string tolower $var] 1 end]
set data($var) $val
- if {$var == "values"} { continue }
+ if {($var == "values") || ($var == "labels")} { continue }
lappend return -$var $val
}
return $return
@@ -214,7 +214,7 @@ package provide form 1.0
# and it matches the value we have for it, make
# the field show up as selected (checked)
if {[info exists DefaultValues($name)]} {
- if {$data(value) == $DefaultValues($name)} {
+ if {[lsearch $DefaultValues($name) $data(value)] >= 0} {
append string { checked="checked"}
}
}
@@ -223,7 +223,7 @@ package provide form 1.0
append string " />"
# ...and emit it
- if {$type == "radio"} {
+ if {($type == "radio") || ($type == "checkbox")} {
html $string$data(label)
} else {
html $string
@@ -273,14 +273,14 @@ package provide form 1.0
}
#
- # reset -- emit an HTML image field
+ # image -- emit an HTML image field
#
method image {name args} {
eval field image $name $args
}
#
- # reset -- emit an HTML "checkbox" form field
+ # checkbox -- emit an HTML "checkbox" form field
#
method checkbox {name args} {
eval field checkbox $name $args
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org