[Zope] Help wanted on Zope ZClasses/DTML please.
Bowyer, Alex
BowyerA@logica.com
Mon, 6 Nov 2000 11:19:03 +1100
Thanks to everyone who gave me tips in answer to my questions, I have one
further question.
I have worked out thanks to Seb's comments that the problem I have with the
use of manage_delObjects is (I think) that I am passing in the title or id
of the object to be deleted rather than the object itself.
I want to put the object into the REQUEST so I can still access it from a
different namespace - at the point I want to do the deletion, my target
object is out of scope.
How do you get a reference or pointer to the current object and put it into
the REQUEST for later use?
Thanks again,
Alex
==================================
Alex Bowyer
IT Contractor, Logica Australasia
Tel : +61 2 9202 8130
Fax : +61 2 9922 7466
E-mail : bowyera@logica.com
WWW : http://www.logica.com.au/
==================================
> -----Original Message-----
> From: Seb Bacon [mailto:seb@jamkit.com]
> Sent: Friday, November 03, 2000 8:08 PM
> To: Bowyer, Alex; zope@zope.org
> Subject: RE: [Zope] Help wanted on Zope ZClasses/DTML please.
>
>
> Hi, just some quick pointers (I'm in a hurry...)
>
> refer to http://zdp.zope.org/projects/zqr/ZopeQR for more details
>
> > <!-- do the deletion - this is the bit that doesn't work -->
> > <dtml-call "manage_delObjects('the_id')">
> > What is the correct way to use manage_delObjects?
>
> <dtml-call "manage_delObjects(the_id)">
>
> should work. What you wrote looks for an object with id
> "the_id". In fact
> you want the value of the_id, which is evaluated for you when
> it's in quotes
> (think of everything in quotes as python).
>
> > Is there a way to get the
> > name of an object's parent (or its own name for that
> matter) and use it to
> > construct a URL?
>
> <dtml-var "PARENTS[0]"> gives you the parent
>
> > 3) When redirecting or linking to a page I have already
> visited, how can I
> > force a refresh? I tried the JavaScript
> window.location.reload(true) but I
> > think that is only supported by Netscape. It didn't work in
> IE5 for me
> > anyway.
>
> window.location.reload() works for me...
>
> > 4) What is the best way to handle security with ZClasses.
> In my example I
> > want the index_html pages to be public but everything else
> to require a
> > password. I managed to require a password for a particular
> instance of the
> > UAPage, but that affects both the index_html and the edit pages.
>
> you can attach permissions to specific methods in a ZClass by
> mapping them
> to existing permissions in the 'define permissions' management tab.
>
> cheers,
>
> seb.
>