[Twisted-Python] woven: one <input> for each ListItem

Glyph Lefkowitz glyph at twistedmatrix.com
Sun Dec 29 13:00:54 EST 2002

On Sun, 29 Dec 2002 04:56:07 +0000, "John Kozak" <jk at xylema.org> wrote:
> Using woven, how do I create an <input/> for each Item in a List?
> e.g. suppose I wanted to do something like
>   <table model="aList" view="List">
>     <tr>
>        <td><input ???/></td>
>        ... want these replicated

Here you probably want something like

    <td listItemOf="aList"> <input view="setMyName" /> </td>

(setMyName is an imaginary view, but I am pretty sure you'll want the input
widget to have a different name based on what the listItem is...)

That will repeat the <td> tag multiple times.  If you wanted to literally
repeat the input tag, then <input listItemOf="aList" view="setMyName" /> would

By the way: you don't need the 'view="List"' attribute on your <table> tag if
the model aList is actually an instance of 'list' -- woven will use appropriate
views for various basic types.

>     </tr>
>   </table>
> how would I go about this?  I've tried a few guesses based on the
> examples, but aren't getting anywhere.
> thanks
> John Kozak

Hope that helps.

 |    <`'>    |  Glyph Lefkowitz: Traveling Sorcerer   |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021229/d5af2f2b/attachment.pgp 

More information about the Twisted-Python mailing list