[Twisted-Python] Woven: can't get view notification to work
dp at twistedmatrix.com
Wed Dec 10 12:23:56 EST 2003
On Dec 10, 2003, at 5:20 AM, Gavrie Philipson wrote:
Change this to lmx(self) and it works. It's the widget that knows the
correct place in the current DOM to make changes, not the template node
that was passed in (node).
A major difficulty with the livepage and view notification architecture
in woven is object identity -- you must have a reference to a DOM node
which is actually in the DOM in order for your mutation changes to
actually show up when the DOM is turned into a string. This is
partially because woven tries really hard to allow you to re-render
only those portions of the page that have changed, as you are
attempting to do here by using notify. Since woven needs to be able to
rerender portions of the page, it also needs to keep around copies of
the original DOM -- the "template" DOM -- so it can pass it to your
function again upon rerendering.
Anyway, Widgets also add an extra level of complexity over the w3c DOM
in woven. This is the main reason I went with rendering functions, not
rendering objects, in Nevow. (The render function can of course be a
method bound to an object).
Neither LivePage nor partial-page rendering are implemented in Nevow
yet, precisely because they are advanced features that are difficult to
get right, and I wanted to make sure the basic rendering features were
correct first. Since Nevow rendering hasn't had any surprising bugs for
over a month, I think it's time to start implementing LivePage and
partial-page rendering in Nevow. I'm planning on doing a lot of
documentation and implementation work around christmastime, when I
should have more time to focus on it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 1751 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20031210/ed09ee58/attachment.bin
More information about the Twisted-Python