cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victoria Vitaver <victo...@tt.com.au>
Subject Re: How do I use session parameters in a ESQL-Logicsheet
Date Fri, 15 Jul 2005 04:31:44 GMT
Urs Iwert wrote:
> Hi
> 
> I need data from a database using ESQL-Logicsheet. The sql statement
> must be filtered depending on the current session (user logon) and on
> session parameters. The session parameters are used, because there are
> quite a lot of parameters and all of them are used to query different
> data.

Dont forget that even though you are using esql, it is still an XSP page,

so I think you could quite easily declare  xmlns:xsp-session="http://apache.org/xsp/session/2.0"
namespace like :

<xsp:page 
    language="java" 
    xmlns:xsp="http://apache.org/xsp" 
    xmlns:esql="http://apache.org/cocoon/SQL/v2"
    xmlns:xsp-session="http://apache.org/xsp/session/2.0" 
>

and do something like :

<esql:query>
 ... 
 WHERE    p.package_code = <esql:parameter type="string"><xsp-session:get-id/></esql:parameter>
 ....

</esql:query>


Inside your code. I have not tested this  .. but I think it should work.

Have a look at  http://cocoon.apache.org/2.1/userdocs/xsp/sessions.html for more detailed
information.

HTH.

Vica

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


Mime
View raw message