----- Original Message -----
From: Dieter Maurer <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 10:28 PM
Subject: Re: [Zope] document_src not doing what I thought it did

> Tim Hicks writes:
>  > I have a dtml-documentish zclass and have created a custom edit method
>  > it so that I can do an automatic reindex when each instance is edited.
>  > created this custom form by simply copying the source html that is
>  > for the standard edit form, and then replacing the static parts of what
>  > copied with various <dtml-var > inserts (see below).  This seemed to go
>  > according to plan until I realised that something strange is happening
>  > I try to view this edit form for an instance of the zclass.  In most
>  > everything seems normal, but when I try to edit an instance that has a
>  > property set to 'private', my 'privacy' method kicks in and redirects
>  > away from the edit form to my standard 'Restricted Page'.  The
>  > is written into the text of the instance I am trying to edit, so I
>  > that by using <dtml-var document_src>, the actual source would get
placed in
>  > the text area without being processed.  This is what appears to happen
>  > the instance does not have the 'private' property.  I guess therefore,
>  > question is, am I using document_src correctly?
> Is is possible that your edit form is called
> in the context of you ZInstance?

I'm not sure I completely understand the terminology you use, but I guess it
sounds right that the edit form method is called 'on' (in my terminology
;-) ) the Zclass instance.  It is in that way that the <dtml-var
id/title/get_size/etc> retrieve the attributes of the instance and not the
method itself... is that correct? Is that what you mean?

> Then, it might be able that *it* interpretes the "private"
> and redirects before "document_src" is executed at all.

Each Zclass instance has <dtml-call privacy><dtml-if "available* ==
1"><dtml-call RESPONSE.redirect(restricted)><dtml-else>blah</dtml-if> . (*
set by the privacy method).  Thanks for your help with that btw :-).
However, the edit form method does not have this code in it.  As far as I
can gather, the only time the method gets to 'see' the code shown above is
when it inserts <dtml-var document_src>.

What am I missing?


> Dieter

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to