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"> <parameter>authentication/authentication/ID</parameter> </mode>
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 action.
Chris.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
