TAL problem: getting to one's classes
Hello, Could someone give me some hints on how to help TAL get to my classes. My situation is: my classes are in zope/lib/python/Products/MyProduct/. 'mainClass' basically creates a folder object in Zope with a user interface (index_html and such). And this UI basically allows for the creation of various other objects inside this mainClass container. In other words, pretty similar to what ZMI does. So, I create the mainClass using the ZMI itself. Then I can access the UI as normal user from the net (outside ZMI) - namely, I get to the index_html form generated by mainClass. I think the ZMI analogy would be 'manage_addmainClassForm'. But then I can't access my method to process the form, which lives in Products/MyProduct/someOtherClass. My TAL page (or zpt, if you will) is looking inside the mainClass object (folder) for this method, while I want it to look for it in Products/MyProduct/someOtherClass. And I'm having some problem understanding the TAL Tutorials. Hence this message. Any help appreciated. Regards, Vio
vio writes:
... access to additional classes in a product ... Classes in your product are not exposed directly. You need to go through a ProductDispatcher (--> App.FactoryDispatcher) which gives you a FactoryDispatcher.
Beside the defined constructors, the FactoryDispatcher can access the contents of the mapping "_m" in your products "__init__". You get the "FactoryDispatch" through ObjectManager.manage_addProduct[yourProduct] Dieter
participants (2)
-
Dieter Maurer -
vio