sqlmessage
tag. Wherever that tag goes is where the message goes. If there is no sqlmessage
tag, by default it will be placed at the
very top of the page inside <H2> tags.sqlrowerror
tag. By
default it will not appear at all
(instead, the Message will give a
general "failed to insert one or more rows") so look sharp!required
attribute is set, or the constraints
attribute evaluated to false). By default the message will be inserted
just before the offending sqlfield
tag, followed by a <BR />.sqlerror
is the only tag which takes another
attribute: the name
of the field it's associated with. This name must be the returned name
of the field; if you used an alias and called your field "e.name AS
ename", your sqlerror
's name
must be "ename".startMarkup
and endMarkup
.
The point of these is simple: generally, if the error does appear,
you'll want it to be preceded or followed by some code (such as a
<tr></tr>), but not if it doesn't appear. These attributes
allow you to define HTML code which should be printed only if the error is printed. Note
that the following example is not
proper XHTML markup, but by the time it's printed it will be. 8-)<sqlerror name="employees.name" startMarkup="<tr><td
colspan='5'>" endMarkup="</td></tr>" />
Previous: Working With Data | Errors | Linking to Templates