[Zope] Fwd: How do I set properties from DTML? (Repost)

R. David Murray bitz@bitdance.com
Mon, 20 Mar 2000 08:39:56 -0500 (EST)


On Thu, 16 Mar 2000, Joachim Werner wrote:
> I'm working on a thing I'll probably call "ZBox"; it's a "widget
> method" that creates HTML-table based boxes on the screen that can be maximized
> and minimized, like the ones on some of the big web portals.
[...]
> Where should one put the method to update the property status? The tricky thing
> is that after the update the site from where the request came has to be
> re-rendered!

Is this really what you want to do?  Under this scheme, user 1 views the
site, clicks on the maxamize box, and gets the rerendered page.  Now
user 2 visits the site, and sees the maximized box.  He doesn't want
that one, so he minimizes the box.  Now user 1 clicks to maximize some
other box, and suddenly his previously maximized box is minimized.

Or am I missing something about your design?

In any case, changing properties in this way to store state is going to
cause your ZODB to grow quickly as each property state change is stored
as a new, undoable, transaction.

> I know I could switch to cookies or SQL-based stuff. But that wouldn't make the
> solution flexible for use with Zope objects.

It seems to me you want to use either some sort of Session product to
retain the state, or do what I suspect the tree product does and
put the state you need to set/save into the URL using argument
passing ("?xxx=yyy") or by using forms to submit the change requests
and storing the state in 'hidden' fields in the frorm.

--RDM