You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Geelen <st...@hotmail.com> on 2004/02/27 15:45:38 UTC
Pass session attribute to action
Hi,
I have following in my sitemap:
<map:action name="mod-db-upd"
src="org.apache.cocoon.acting.modular.DatabaseUpdateAction">
<descriptor>context://test/database/database-descriptor.xml</descriptor>
<throw-exception>true</throw-exception>
</map:action>
and
<!-- -->
<!-- Update myaccount/myaccount-update-custinfo -->
<!-- -->
<map:pipeline>
<map:match pattern="myaccount/myaccount-update-custinfo.act">
<map:act type="mod-db-upd">
<map:parameter name="table-set" value="customers"/>
<map:parameter name="custid" value="{session-attr:custid}"/>
<map:redirect-to uri="info.act"/>
</map:act>
<map:redirect-to uri="update-failed.content"/>
</map:match>
</map:pipeline>
I would like to pass the custid (kept in the session) to the action:
<map:parameter name="custid" value="{session-attr:custid}"/>
Looking in the sitemap.log the action appareantly only takes into
consideration thje paraemeters in the request object:
>From sitemap.log:
Trying to set column customers.custid from request-param using getAttribute
method
Setting column customers.custid [0] null
How can I passs the session custid to the action ?
I would like to be sure that if the session is no longer active the user
cannot update the record anymore.
Regards,
Stefan
_________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org