Hi,
I posted this question a month ago or so but did not get any reaction.
 
I hope I've more luck now...
 
Basically the question is: How can I passs the a session attribute to  a DatabaseUpdateAction ?
 
 
More info below:

I have following in my sitemap:

<map:action name= "mod-db-upd "
src= "" >

<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

Reply via email to