I needed to have a container-like Product. In order to avoid re-inventing the wheel, I simply made it Folderish, and went about the meat of the Product. There is a companion Product which is contained by the Folderish Product to provide content. I don't particularily want the user/manager to be able to create this Product any old place, since it doesn't make sense out of context. It's not hard to throw an error, but I would rather the Product simply not show up in the list of Addable items in the management system. Is there a way to do this? Mike. -- --- | Mike Pelletier Work: 519-746-1607 /opeware! | Software Developer Home: 519-725-7710 --- | mike@zopeware.com Fax: 519-746-7566 http://www.zopeware.com | Zopeware is not endorsed by Digital Creations
On Fri, 12 Feb 1999, Mike Pelletier wrote:
I needed to have a container-like Product. In order to avoid re-inventing the wheel, I simply made it Folderish, and went about the meat of the Product. There is a companion Product which is contained by the Folderish Product to provide content. I don't particularily want the user/manager to be able to create this Product any old place, since it doesn't make sense out of context. It's not hard to throw an error, but I would rather the Product simply not show up in the list of Addable items in the management system. Is there a way to do this?
Just make an object a sub class of the Folder. Like you did, and then overide the manage method with some new DTML. I thought I had a sample of that around here but I can't find it at the moment... --------------------------------------------------- - Scott Robertson Phone: 714.972.2299 - - CodeIt Computing Fax: 714.972.2399 - - http://codeit.com - ---------------------------------------------------
On Fri, 12 Feb 1999, Scott Robertson wrote:
Just make an object a sub class of the Folder. Like you did, and then overide the manage method with some new DTML. I thought I had a sample of that around here but I can't find it at the moment...
I'm not following you. Or perhaps you're not following me. I'm not unhappy with the behaviour of my Folderish class. I want to hide my supporting class from the standard Folder management interface. What specifically do I want to override to accomplish that? Mike. -- --- | Mike Pelletier Work: 519-746-1607 /opeware! | Software Developer Home: 519-725-7710 --- | mike@zopeware.com Fax: 519-746-7566 http://www.zopeware.com | Zopeware is not endorsed by Digital Creations
Jim was (after taunting me for no reason I can tell) very helpful in pointing out that Folderish classes can have their own meta-types tupple, just like in the __init__.py file, which makes those meta-types unique to that kind of Folderish class. I haven't tried it yet, but I thought someone else might like to know. Mike. -- --- | Mike Pelletier Work: 519-746-1607 /opeware! | Software Developer Home: 519-725-7710 --- | mike@zopeware.com Fax: 519-746-7566 http://www.zopeware.com | Zopeware is not endorsed by Digital Creations
On Fri, 12 Feb 1999, Mike Pelletier wrote:
Jim was (after taunting me for no reason I can tell) very helpful in...
Excuse me. It was Paul. Please forgive me, it's ten to five on a Friday... Mike. -- --- | Mike Pelletier Work: 519-746-1607 /opeware! | Software Developer Home: 519-725-7710 --- | mike@zopeware.com Fax: 519-746-7566 http://www.zopeware.com | Zopeware is not endorsed by Digital Creations
On Fri, 12 Feb 1999, Mike Pelletier wrote:
I'm not following you. Or perhaps you're not following me. I'm not unhappy with the behaviour of my Folderish class. I want to hide my supporting class from the standard Folder management interface. What specifically do I want to override to accomplish that?
Sorry about the vagueness. This was something I did as an experiment. I did it with a Document, but I think you can figure it out with a little bit of poking around. Here is a basic example of what I did with an object that was derived from a document yet overrides the management screens. #--Begin Sample----- class MyObject(Document.Document): "Doc String" manage_editForm=HTMLFile('mydocumentEdit', globals()) manage = manage_main = manage_editDocument = manage_editForm ...other class code... #------------------- What I have done is overridden the default manage functions with a DTML method that displays my very own edit page. Which happens to replace the <textarea> widget with a Java applet. It all works except I was having problems getting the applet to post info back to Zope and I haven't had time to sit down and fix it yet. Let me know if you would like to see the rest of the code. --------------------------------------------------- - Scott Robertson Phone: 714.972.2299 - - CodeIt Computing Fax: 714.972.2399 - - http://codeit.com - ---------------------------------------------------
participants (2)
-
Mike Pelletier -
Scott Robertson