cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: Authentication context and modular database action.
Date Fri, 12 Dec 2003 08:30:57 GMT
Simon Hutchinson wrote:
> Hi,
> I am using a ModularDatabaseAction to insert a row into a database.
> Everything is working fine as most of the field values are available
> as request parameters.However I also need to store a value that is
> stored in the authentication context.
> I am sure that writing my own InputModule for this is overkill as the
> information is available already.
> Either of the following types of solution would be cool if anyone could
> point me in the right direction.(of course I am completely open to a 
> better solution :))
> 1). Is it possible to access the authentication context using the 
> session-context InputModule in the database descriptor ?
> ie
> <value name="fieldname"  type="int">
>     <mode name="session-context">                                     
> <parameter>authentication/authentication/ID</parameter>
>          </mode>
> </value>

you need to tell the action when to use this mode with the type
attribute. For example, you might want to use it only on updates from a
specific form. This corrolates to the others-mode attribute for tables
in tablesets.

Since you most likely will use this mode for every operation, you need
to add type="all" to the mode:

  <mode name="session-context" type="all">

> 2). Is it possible to pass values as parameters to the action directly 
> from sitemap.

No, because input modules don't have access to parameters passed to the


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message