At 08:34 PM 11/27/00 -0500, [EMAIL PROTECTED] wrote:
>Thanks Phillip. Is there a way to pass my REQUEST info to the ADD 
>Trigger? 
>
>I am under the impression that only "self" and some other ZPattern 
>specific properties are available to the trigger.

You also have access to everything in the acquisition hierarchy of the
trigger or SkinScript method itself, which of course includes REQUEST.  So
either REQUEST (which would look it up in the trigger's acquisition
hierarchy) or self.REQUEST (which would look it up in the DataSkin's
acquisition hierarchy) should work fine.

Now that I've told you *how* to get at it, however, I should warn against
making too much use of the request to get information that
could've/should've been passed to the DataSkin by application or domain
code.  It makes sense to use the request if you want to log things about
the request that caused the change, but it's probably not a good idea to be
looking at form fields and such, since that would introduce an undesirable
coupling between your application structure and your triggers.  Ideally,
triggers should only look to the DataSkin for anything other than methods
or constants they need to carry out their job.  In practice of course, if
you want to do something like log the AUTHENTICATED_USER and whether they
were logged in via SSL, then of course the REQUEST is the right way to do it.


_______________________________________________
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 )

Reply via email to