[Zope-dev] Return variables from a DTML Method
I want to change some ZClass properties by getting return results from a DTML Method. Something like this: dtml-call "myzclass.propertysheets.get('Basic').manage_changeProperties(dtmlM eth(this(),_))". How do I get the dtmlMeth to return a Mapping? (or should I be doing this a different way?) Thanks. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Create Virtual DataSkin
This simple issue is driving me crazy... I am trying to create a DataSkin with some Properties in a MySQL database. So I have an ID, NAME, and DESCRIPTION that is in REQUEST and using: dtml-let ni="newItem(key=REQUEST['key'])" nips="ni.propertysheets.get('Basic')" dtml-call "nips.manage_changeProperties(REQUEST=REQUEST)" /dtml-let The item gets created but the Properties are not changed. Can someone please post the ADD/CHNAGE Trigger syntax and accompanying ZSQL Methods for a simple creation of a DataSkin ZClass. Much appreciated. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] More ZPatterns confusion
I am trying to add a ZClass with a DataSkin Property sheet to a Virtual Rack. So I call the following: dtml-let ni="newItem(key=REQUEST['key'])" props="ni.propertysheets.get('Basic')" dtml-call "props.manage_changeProperties(REQUEST.form)" /dtml-let I assume this should call ADDED and CHANGE trigger's to place data in my SQL Database. Unfortunately this is not happening. The ADDED trigger is doing the initial creation, but the changeProperties is not effecting the right changes. It seems that the CHANGE trigger is not getting called. Is there something else I should be doing? Thanks for all the help ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] ZPatterns Project Help!
Thanks for answering Steve. Unfortunitly I am working with version 0.3 of ZPatterns so I have to use GAP. When I try to translate your Skinscript into GAP like this "attrsexprs:account_object=(RESULT is _.None) and NOT_FOUND or RESULT" and I try to access the object's id with dtml-var "account_object.id" I get a "NameError" on account_object. Alternativly if I do dtml-var account_object I get a "KeyError". (BTW. for testing I used "accounts.getItem('1434')" which is a valid object. If I do "account_object=RESULT.id" it works fine.) I appreciate any help on this. -Ben Hi Ben, GAPs are sort of deprecated at this point in favor of SkinScript. In SkinScript you might do something like this: WITH accounts.getItem(self.account_id) COMPUTE account_object=RESULT or more carefully... WITH accounts.getItem(self.account_id) COMPUTE account_object=(RESULT is _.None) and NOT_FOUND or RESULT -steve "bentzion" == bentzion [EMAIL PROTECTED] writes: bentzion Another question... bentzion I want to have a GAP that will add some other Object to bentzion an attribute of my DataSkin. This is what I have tried ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZPatterns Project Help!
Another question... I want to have a GAP that will add some other Object to an attribute of my DataSkin. This is what I have tried with no success. fromexpr: accounts.getItem(self.account_id) attrsexprs: account_object=RESULT This way in my UI Methods in my DataSkin I can access (and change) the attributes of "account_object". Q. How can I do this? Should I be doing this in a different/better way? Thanks, -Ben ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )