[Zope-dev] New ZPublisher Types
Martijn Pieters
mj@antraciet.nl
Tue, 06 Jul 1999 13:21:55 +0200
At 20:08 05/07/99 , Pam Crosby wrote:
>Cathi,
>Your documentation has been added to the Trinkets Tutorial online at
>http://www.zope.org/Documentation/Reference/Trinkets/index_html
Very nice!
These changes are only available in the latest CVS release, however. How
will a new developer be able to detect this from the documentation?
Some errors:
--
RECORD
<INPUT TYPE="text" NAME="person.name:record" SIZE="30">
The input tag for the name field is named person.name:record:ignore_empty. The
:record part of the name indicates to Zope that the field should be
converted to a record before passing it to the published method. A record
variable will be created called person and it will have an attribute called
name.
- Either: The first line should read: .. is named person.name:record. The ..
- Or: the NAME field of the INPUT tag should read:
person.name:record:ignore_empty
--
RECORDS
The records method is implemented:
<P><H2>Member #1<H2></P><br>
<P>lease enter your name:<BR>
<INPUT TYPE="text" NAME="member.name:records:ignore_empty"
SIZE="30"><BR>
your email:<BR>
<INPUT TYPE="text" NAME="member.email:records:ignore_empty"
SIZE="30"><BR>
your age:<BR>
<INPUT TYPE="hidden" NAME="myname.age:int:records:default" Value="0"<BR>
<INPUT TYPE="text" NAME="member.age:int:records:ignore_empty"></P><BR>
<P><H2>Member #2</H2></P><BR>
<P>Please enter your name:<BR>
<INPUT TYPE="text" NAME="member.name:records:ignore_empty"
SIZE="30"><BR>
your email:<BR>
<INPUT TYPE="text" NAME="member.email:records:ignore_empty"
SIZE="30"><BR>
your age:<BR>
<INPUT TYPE="text" NAME="member.age:int:records:ignore_empty<a
href="records"">></P>
In this sample the form asks for a name and age for two different members
of a club. The part appears in each input tag. This type will create a list
called members that will hold records (in this case it will hold two
records). Each record can have the attributes name and age.
- The hidden field should read: .. NAME="member.age:int:records:default" ..
- A newline before the line 'Member #2' would increase readability.
--
--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------