Re: [Zope] How to make two racks work under one specialist?
Hi Steve, Both racks are set to be loaded by accessing 'id', which, as you guessed right, don't appear in handling attributes list! This is the simplified skinscript in maleMemberRack: WITH getMale(self.id) COMPUTE original_object=RESULT WITH self.original_object COMPUTE name=id, gender=gender, email=email getMale is a python method: member = getMember(id) if id.gender == 'male': return member Things just go opposite direction in femaleMemberRack. What do you think? Dirksen __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
Hi Dirksen, Ok.. you need to set the 'load by accessing attribute' field to 'original_object'. You may need to change your SkinScript to something like: WITH getMale(self.id) COMPUTE original_object=(RESULT is _.None) and NOT_FOUND or RESULT So that when getMale returns _.None, the SkinScript returns NOT_FOUND -steve
"Dirksen" == Dirksen <dirksen_lau@yahoo.com> writes:
Dirksen> Hi Steve, Dirksen> Both racks are set to be loaded by accessing 'id', which, Dirksen> as you guessed right, don't appear in handling attributes Dirksen> list! Dirksen> This is the simplified skinscript in maleMemberRack: WITH Dirksen> getMale(self.id) COMPUTE original_object=RESULT WITH Dirksen> self.original_object COMPUTE name=id, gender=gender, Dirksen> email=email Dirksen> getMale is a python method: member = getMember(id) if Dirksen> id.gender == 'male': return member Dirksen> Things just go opposite direction in femaleMemberRack. Dirksen> What do you think? Dirksen> Dirksen Dirksen> __________________________________________________ Do You Dirksen> Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions Dirksen> of Products. http://shopping.yahoo.com/ Dirksen> _______________________________________________ Zope Dirksen> maillist - Zope@zope.org Dirksen> http://lists.zope.org/mailman/listinfo/zope ** No cross Dirksen> posts or HTML encoding! ** (Related lists - Dirksen> http://lists.zope.org/mailman/listinfo/zope-announce Dirksen> http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Dirksen -
Steve Spicklemire