Trying to change the root of the tree using the name attribute of the dtml-tree tag
Hello. I am trying to change the root of the tree using a variable which is initialized using the REQUEST.set method. However, the root does not change and remains the default which in this case is the root folder. I have provided my code below. This code resides in a DTML method which is called when a form in a DTML document is submitted. Any help would be greatly appreciated. -Asad <dtml-call "REQUEST.set('testFolder', REQUEST.form['folderName'])"> <dtml-tree branches_expr="objectValues('Folder')" name="testFolder" skip_unauthorized> <dtml-var getId> </dtml-tree> __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
Asad Habib wrote at 2003-2-10 07:47 -0800:
I am trying to change the root of the tree using a variable which is initialized using the REQUEST.set method. However, the root does not change and remains the default which in this case is the root folder. I have provided my code below. This code resides in a DTML method which is called when a form in a DTML document is submitted. Any help would be greatly appreciated.
-Asad
<dtml-call "REQUEST.set('testFolder', REQUEST.form['folderName'])">
<dtml-tree branches_expr="objectValues('Folder')" name="testFolder" skip_unauthorized> <dtml-var getId> </dtml-tree>
The object argument to "dtml-tree" should be an object not a string ... However, I would expect you get an exception or nothing when this were the only error. Can a folder "testFolder" be acquired (accidentally)? Acquisition comes before REQUEST lookup. Dieter
----- Original Message ----- From: "Asad Habib" <ahabib1357@yahoo.com> To: <zope@zope.org> Sent: Monday, February 10, 2003 4:47 PM Subject: [Zope] Trying to change the root of the tree using the name attribute of the dtml-tree tag
Hello. I am trying to change the root of the tree using a variable which is initialized using the REQUEST.set method. However, the root does not change and remains the default which in this case is the root folder. I have provided my code below. This code resides in a DTML method which is called when a form in a DTML document is submitted. Any help would be greatly appreciated.
-Asad
<dtml-call "REQUEST.set('testFolder', REQUEST.form['folderName'])">
<dtml-tree branches_expr="objectValues('Folder')" name="testFolder" skip_unauthorized> <dtml-var getId> </dtml-tree>
replace the name attribute by an equivalent expr attribute: <dtml-tree branches_expr="objectValues('Folder')" expr="_[testFolder]" skip_unauthorized> <dtml-var getId> </dtml-tree>
participants (3)
-
Asad Habib -
Cornelis J. de Brabander -
Dieter Maurer