[Zope] CoreSessionTracking problem with <dtml-return>
Chris McDonough
chrism@zope.com
14 Jun 2002 16:12:06 -0400
You need to call the dtml method instead of getting a reference to it,
e.g.:
<dtml-let error_list="forms.validate_core_user_form(_.None, _)">
On Fri, 2002-06-14 at 03:16, Aseem Mohanty wrote:
> Hi all,
>
> I have the following peice of DTML code :
>
> <dtml-let error_list="forms.validate_core_user_form">
> <dtml-if "error_list != []">
> <dtml-let data="session_data_mgr.getSessionData()">
> <dtml-call "data.set('error_list',error_list)">
> <dtml-var error_list>
> </dtml-let>
> </dtml-if>
> </dtml-let>
>
> for which I get the following error:
>
> Error Type: InvalidObjectReference
> Error Value: Attempt to store an object from a foreign database connection
>
> The function "validate_core_user_form" basically sets up a list:
>
> <dtml-let error_list="[]">
>
> and populates it. and the return it with : <dtml-return error_list>
>
> I had to that because it seems session variables don't survive folder
> jumps (set in one / access in another and poof they disappear). Maybe a
> new session object created for a folder jump (I have to look into that)
>
> the <dtml-var error_list> faithfully prints out the right results.
>
> So what am I doing wrong here...???
>
> TIA
> AM
>
> --
> ==================================================================
> Aseem Mohanty
> Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706
> (R) 510 7696011 (M) 510 3014871 (O) 510 5279231
> ==================================================================
> "I saw `cout' being shifted "Hello world" times to the left and
> stopped right there!!" -- Steve Gonedes
> ==================================================================
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> 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 )