Hi there, I'm writing a product (in Python, not with ZClasses) which consists of: form - a folderish object to which you can add.. fields - a number of SimpleItemish objects that can be added to a form What I have working: * I can make the form behave like a folder by deriving it from OFS.ObjectManager * I have a number of fields that can be added anywhere in the Zope tree What I want to reach is this situation: * I want the form to behave like an folder, but only fields should be addable. and * Fields should not be addable anywhere but in a form. What set of incantations would accomplish this? Any example source? Or Zope source code I should study? Anything? Any hint in the right direction would be appreciated. Regards, Martijn
I have a similar question, but I'm working with ZClasses. If I subclass Folder, I get a pick list of all possible classes that I can add to my object. If I subclass ObjectManager, I don't automatically get any list of classes that I can add to my object. I presume that I have to do something to generate the list of classes that I want to be able to add, but I don't know what I have to do. Can someone help get me pointed in the right direction. -- Thanks -- Loren
-----Original Message----- From: Martijn.Faassen@vet.uu.nl [mailto:Martijn.Faassen@vet.uu.nl]On Behalf Of Martijn Faassen Sent: Thursday, November 18, 1999 13:13 To: zope-dev@zope.org Subject: [Zope-dev] Writing custom folderish products
Hi there,
I'm writing a product (in Python, not with ZClasses) which consists of:
form - a folderish object to which you can add.. fields - a number of SimpleItemish objects that can be added to a form
What I have working:
* I can make the form behave like a folder by deriving it from OFS.ObjectManager
* I have a number of fields that can be added anywhere in the Zope tree
What I want to reach is this situation:
* I want the form to behave like an folder, but only fields should be addable.
and
* Fields should not be addable anywhere but in a form.
What set of incantations would accomplish this? Any example source? Or Zope source code I should study? Anything? Any hint in the right direction would be appreciated.
Regards,
Martijn
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev No cross posts or HTML encoding! (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
On Thu, 18 Nov 1999, Martijn Faassen wrote:
Hi there,
I'm writing a product (in Python, not with ZClasses) which consists of:
form - a folderish object to which you can add.. fields - a number of SimpleItemish objects that can be added to a form
What I have working:
* I can make the form behave like a folder by deriving it from OFS.ObjectManager
* I have a number of fields that can be added anywhere in the Zope tree
What I want to reach is this situation:
* I want the form to behave like an folder, but only fields should be addable.
and
* Fields should not be addable anywhere but in a form.
What set of incantations would accomplish this? Any example source? Or Zope source code I should study? Anything? Any hint in the right direction would be appreciated.
Regards,
Martijn
Use VisualZope. The Forms are XML Documents, Widgets - folderish items containing other bits 'n pieces. Remember, the XML Document Element functions can be applied to anything in Zope (check lib/python/Ofs/ZDOM.py for more info). Cheers, Anthony Pfrunder
Anthony Pfrunder wrote:
Use VisualZope. The Forms are XML Documents, Widgets - folderish items containing other bits 'n pieces.
I don't see how VisualZope is going to help me here, unless as example code? I'm just trying to make a folderish object that has a set of other objects that are addable (which then are not addable in normal folders). Sort of like in the Product View you can only add Products. But I studied that code and I couldn't make a lot of sense of it. Anyway, my approach is quite unambitious, at least compared to VisualZope. :) I'm sure there are synergies between my system and VisualZope, but I just want to get my system done first.
Remember, the XML Document Element functions can be applied to anything in Zope (check lib/python/Ofs/ZDOM.py for more info).
Hm, I know this, but I don't understand why this is relevant, I'm afraid. I'll see about taking a look at the latest VisualZope, though. Thanks! Regards, Martijn
participants (4)
-
Anthony Pfrunder -
Loren Stafford -
Martijn Faassen -
Martijn Faassen