cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Hutchinson <simon.hutchin...@misgl.com>
Subject Authentication context and modular database action.
Date Thu, 11 Dec 2003 22:21:05 GMT
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>


note: I tried this and it didn't work.The IDs value is available in the 
sitemap using the same input module

ie

{session-context:authentication/authentication/ID}

So maybe I am writing the <mode> incorrectly ?


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

ie

<map:act type="mod-db-add">
   <map:parameter name="table-set" value="mySet"/> 

   <map:parameter name="myparam" 
value="{session-context:authentication/authentication/ID}"/>
</map:act>


If the answer is yes than a code snippet showing how to access the 
parameter from within the database descriptor would be great.

Any assistance to a new cocoon user would be wonderful.

Thanks

Si


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message