[Zope] manage_editCataloger-Question
Tom
Tom.Schwaller@linux-magazin.de
Sat, 09 Oct 1999 04:27:09 +0000
I applied the proposed patch
def manage_editCataloger(self, default, REQUEST=None):
""" """
self.default_catalog=default
message = "Your changes have been saved"
return self.manage_main(self, REQUEST,
manage_tabs_message=message)
to use it in
<dtml-let obj="Firma.createInObjectManager(REQUEST['id'], REQUEST)">
<dtml-call "obj.propertysheets.daten.manage_editProperties(REQUEST)">
<dtml-call "obj.propertysheets.daten.manage_editCataloger('Catalog1',
REQUEST)">
<dtml-call "obj.reindex_object">
</dtml-let>
which will not work, because of the return self.manage_main() call.
After updating the entry it shows up in Catalog1 as expected,
but I would like to have it there directly after inserting the entry.
Just to see if I understand the code correctly, I changed
manage_editCataloger to
def manage_editCataloger(self, default, REQUEST=None):
""" """
self.default_catalog=default
self.index_object()
message = "Your changes have been saved"
return self.manage_main(self, REQUEST,
manage_tabs_message=message)
and after that used
<dtml-let obj="Firma.createInObjectManager(REQUEST['id'], REQUEST)">
<dtml-call "obj.propertysheets.daten.manage_editProperties(REQUEST)">
<dtml-call "obj.propertysheets.daten.manage_editCataloger('Catalog1',
REQUEST)">
</dtml-let>
which works as expected. :-)
So, what about
def manage_editCataloger(self, default, REQUEST=None, reindex=1):
""" """
self.default_catalog=default
if reindex: self.index_object()
message = "Your changes have been saved"
return self.manage_main(self, REQUEST,
manage_tabs_message=message)
or is there a better solution?
--
Tom