cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Washeim <esa...@canuck.com>
Subject SQL and the xspCurrentNode
Date Sun, 25 Jun 2000 16:07:49 GMT
Incidently, for those of you wondering how to do validation with the sql
taglib, try:

<ANELEMENT>
        <sql:execute-query>
        &connection;

            <sql:doc-element>LOGIN</sql:doc-element>
            <sql:row-element>MEMBER</sql:row-element>
            <sql:tag-case>upper</sql:tag-case>
            <sql:max-rows>1</sql:max-rows>
            <sql:null-indicator>yes</sql:null-indicator>
            <sql:query>
            select FIRSTNAME, LASTNAME from TABLE where PASSWORD
='<xsp:expr>callBeanHash( request.getParameter("pwd"))</xsp:expr>'
            </sql:query>
        </sql:execute-query>

        <xsp:expr>validate( document, xspCurrentNode , request,
session)</xsp:expr>

</ANELEMENT>

Where the validate member method operates on the current node, ANELEMENT . .
. this works well, since, at run-time, the element's children are populated
in order ...

A nice by-product of this is that you don't have to worry about context . .
. just the node at hand . . .


-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 



Mime
View raw message