[Zope] namespace-problem
Hi everybody, what I want to do is fairly simple, but I've got a namespace problem: - via a form I want to add a new folder, add some properties to the new folder, then add a DTML document within the new folder. - whatever I try, the properties as well as the new document are added to the parent folder of the new folder instead of to the new folder. Here some experiments (don't look at the syntax): dtml- call "manage_addFolder (NewFolderName)" dtml-with "_.getitem(NewFolderName)" dtml- call "manage_addProperty (ID,...)" dtml- call "manage_addDocument (ID,...)" /dtml-with This looks fine to me, but ZOPE insists on creating the new document in /OldFolder instead of /OldFolder/NewFolder Some more stuff for wondering: If I do a dtml-with "_.getitem('NewFolder')" dtml-var "_.getitem('NewFolder',0)" to get an actual value for testing purposes, ZOPE returns the *correct* value of 'NewFolder' But if I do an additional dtml-in objectItems id: dtml-var sequence-key, type: dtml-var meta_type /dtml-in to list the objects of the actual namespace (placed *after* the above dtml-with.., the output consists of the objects of the /OldFolder-namespace, but not that of the /OldFolder/NewFolder. ...I'm sure this is a rookie-problem and can be solved by turning a switch or two (perhaps in my brain), but I'm stuck. Do you/anybody has any clue? Thanks in advance - Alexander ~ http://www.herrenausstatter.de - Der Online-Herrenausstatter Kostenlose Serviceline: 0800 -999 66 33 Versandkostenfreie Lieferung - 30 Tage Rückgaberecht ~ Verwaltungsadresse: DePauli.com Aktiengesellschaft Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] API and namespace
Hi all, so I was in error as I finally judged myself unterstanding the namespace concept... ;) Via a configuration interface, I want to add a folder, add some properties for the new folder, then add and fill a dtml-document within the new folder. Adding the folder works fine, but then I can't change the namespace to work with the new folder - the namespace sticks to the parent-folder and my code stupidly tries to add the new properties and document there. How can I switch the namespace to the new folder (dtml-with new_folderid doesn't do the trick...) My code right now looks as follows (the dtml-method is called via a form): --! add a new folder -- dtml-call "manage_addProduct['OFSP'].manage_addFolder (id=REQUEST['new_folderID'], title=REQUEST['new_folderID'])" [..] dtml-with new_folderID ...tried dtml-with "_.namespace(folder = new_folderID)" as well... --! add some properties -- dtml-call "manage_addProperty(id='bestand', value=REQUEST['bestand'], type='int')" [..] --! now add a new index_html -- dtml-call "manage_addDocument(id='index_html', title=REQUEST['animalID'])" [..] /dtml-with Any help highly appreciated! Cheers, Alexander ~ http://www.herrenausstatter.de - Der Online-Herrenausstatter Kostenlose Serviceline: 0800 -999 66 33 Versandkostenfreie Lieferung - 30 Tage Rückgaberecht ~ Verwaltungsadresse: DePauli.com Aktiengesellschaft Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: API and namespace
Rehi Sven, thanks a lot for your patience with the dummy - which is me :) Sorry to say that my problem consists even when applying your snippet. Your statement dtml-with "_.getitem('NewFolder')" looks fine to me, but ZOPE insists on creating the new document in /OldFolder instead of /OldFolder/NewFolder Some more stuff for wondering: If I do a dtml-with "_.getitem('NewFolder')" dtml-var "_.getitem('NewFolder',0)" to get an actual value for testing purposes, ZOPE returns the *correct* value. But if I do an additional dtml-in objectItems id: dtml-var sequence-key, type: dtml-var meta_type /dtml-in to get the objects in the actual namespace (surely *after* the above dtml-with.., the output is the one of the /OldFolder-namespace, not that of the /OldFolder/NewFolder. ...I'm sure this is a rookie-problem and can be solved by turning a switch or two (perhaps in my brain), but I'm stuck. Do you/anybody has any clue? Thanks in advance + all the best Alexander Sven Hohage schrieb: For you this is sufficient - dtml- call "manage_addFolder (FolderName)" dtml-with "_.getitem(FolderName)" dtml- call "manage_add (DocumnetName)" /dtml-with ~ http://www.herrenausstatter.de - Der Online-Herrenausstatter Kostenlose Serviceline: 0800 -999 66 33 Versandkostenfreie Lieferung - 30 Tage Rückgaberecht ~ Verwaltungsadresse: DePauli.com Aktiengesellschaft Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MPTrois.com / ZOPE / Systems in Munich
Hi everybody, I'm just looking for a german Zopista who I met during the "systems" fair in Munich where he presented "MPTrois.com". I'd need his name or email because I desperately want to continue our zope-discussion there. Anybody got a clue for me? Thanks in advance Alex ~ http://www.herrenausstatter.de - Der Online-Herrenausstatter Kostenlose Serviceline: 0800 -999 66 33 Versandkostenfreie Lieferung - 30 Tage Rückgaberecht ~ Verwaltungsadresse: DePauli.com Aktiengesellschaft Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] mysql zope
Hi Zopistas! we are looking for a method to do a better integration of mysql 3.23.27 with zope 2.2.2. (we are using the Z MySQL database adapter Z MySQL DA 1.1.3.) We have to store data in a mysql database - we can´t use ZODB because we need the data accessible by other programs via ODBC. We habe implemented several ZClasses like "customer", "product" and "orders". We store their instances (eg. each product, customer and so on) to the mysql-database. Our problem: we can´t use the standard ZOPE management interface to manage the objects, because the methods of this interface store content to the ZODB - and not to the mysql-database. Is there a way to extend the standard ZOPE management interface with additional mysql statements? For example: we select an object in a zope folder, press the ZOPE Delete-Button, then this object is deleted on the mysql-database, not on the ZODB? For each zclass (customer, products, orders) we need these extra methods (Delete, Update, Insert ...), so our thought is that we would prefer to use the ZOPE management interface to do this instead of programming "extra methods" which obviously can't be used within the standard ZOPE management interface. Hope there is somebody out there with an similarly problem solved. best regards Ruediger ~ http://www.herrenausstatter.de - Der Online-Herrenausstatter Kostenlose Serviceline: 0800 -999 66 33 Versandkostenfreie Lieferung - 30 Tage Rückgaberecht ~ Verwaltungsadresse: DePauli.com Aktiengesellschaft Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )