[Zope] How to make and populate properties remotely..? 4 questions of the apocalypse..
Jason Cunliffe
jasonic@nomadicsltd.com
Tue, 5 Sep 2000 16:14:06 -0400
Hello
Hoping some kind enlightened zopistas can point me to existing examples or
show me how the syntax works for this:
1. I need to write a simple general method which will allow me to create a
property in the parent folder.
for example:
'createParentProperty()' DTMLmethod
-----------------------------------------------------------
<dtml with PARENTS[-1]>
<dtml manage_addProperty(Id = 'myNewPopertyName')
<dtml manage_addProperty(type = 'tokens')
<dtml manage_addProperty(value = '')
<dtml-with>
-------------------------------------------------------------
2. Then I need to extend my 'createParentProperty()' method so I can call
it from an URL, http POST or GET.
I want to pass or fetch the parent folder's property 'Id' name.
for example:
http://www.zopesite.net/TOP/SUB/PROJECTA/createParentProperty?=id+statistics
&type=tokens
will create a property Id = 'statistics' in PROJECTA folder of my site whose
type = 'tokens'
but if it exists already it will return a '1'
How to do this?
3. Then I need to do the same thing but this time setting or getting the
property's 'Value' field via http POST or GET.
for example:
http://www.zopesite.net/TOP/SUB/PROJECTA/createParentProperty?=id+statistics
&value+2000september
will create a new property id = 'statistics', type = 'tokens', value ='
2000september'
but if 'statistics' already exists, the method will just change the value
4. Finally some properties we need to 'lock' so they cannot be overwritten
by the above methods.
However I do need to check remotely over http if this is so. For example:
http://www.zopesite.net/TOP/SUB/PROJECTA/createParentProperty?=id+admin&valu
e+2000September
will return an integer '2' or string such as : 'locked' or "property id =
'admin' is locked"
where:
0 = does not exist
1 = exists
3 = locked
How to do this?
...ideally there there should be a separete method we can call to lock or
unlock a property for admin use over http
Thanks for any help..deadlines loom..
- Jason
________________________________________________________________
Jason CUNLIFFE = NOMADICS.(Interactive Art and Technology).Design Director