[Twisted-web] [Nevow] changing the attributes of a node

Jean-Paul Calderone exarkun at divmod.com
Tue Jul 25 07:33:50 CDT 2006


On Tue, 25 Jul 2006 13:03:06 +0200, Manlio Perillo <manlio_perillo at libero.it> wrote:
>Hi.
>
>I need to set/unset an attribute (checked) on a <input type="checkbox">
>element (in a xml template).
>
>I'm using IQ.onePattern, but the problem is that the node is "removed"
>from the "stan context".

Instead, put a slot where the input node would have gone.  Create two
patterns, one for the checked mode and one for the unchecked mode, and
then fill the slot with whichever is appropriate.

The document Nevow will give you during page render has been optimized.
Inspecting and mutating it is only supported on nodes with specials, eg
render directives.

Jean-Paul



More information about the Twisted-web mailing list