cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: AW: how to create dynamic SQL-queries?
Date Wed, 15 Nov 2000 02:10:02 GMT
On Wed, 15 Nov 2000, Christian Parpart wrote:

> > > Maybe, the problem is here the nested tags
> > > (xsp:logic/xsp:content/xsp:logic/xsp:content).
> > > But is there anyone, who can solve the problem?
> >
> > use <xsp:expr> and java expressions:
> >
> > <xsp:expr>(
> >   (request.getParameter("Name") != null)
> >   ? " and name = '"+request.getParameter("Name")+"'"
> > )</xsp:expr>
> >
> 
> Please give me an example for the below.
> 
> > or else use xsp:logic elements before the query element to build the query
> > string and include it in the query element as an expression.

oh, c'mon, it's not that hard to mess around and figure it out:

<xsp:logic>
  String my_query = // whatever;
</xsp:logic>
<esql:connection>
  ...
  <esql:execute-query> 
    <esql:query><xsp:expr>my_query</xsp:expr></esql:query>
  </esql:execute-query>
</esql:connection>

- donald


Mime
View raw message