cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: is <sql ... skip-rows="{@next}"> possible?
Date Sun, 07 May 2000 04:11:30 GMT
On Tue, 2 May 2000, Thomas Guettler wrote:

> The following code does not work. {@skip} gets ignored.
> (I use the get-method (http:asfaf.asf.af/asf?skip=10))
>   <query connection="www_odbc" max-rows="2" skip-rows="{@skip}">  
>    select * from person 
>   </query> 
> 
> I found a solution, which I don't like, because it uses xsp.
> Has some one an idear how to achieve this without xsp?
> 
> Here is my solution:	
>   <query connection="www_odbc" max-rows="2">  
>   <xsp:attribute
> name="skip-rows"><xsp:expr>request.getParameter("skip")</xsp:expr></xsp:attribute>
>    select * from person 
>   </query> 
> 
> 
> Why works the {@foo} inside the query, but not in the attributes?:
>   <query connection="www_odbc" max-rows="2" skip-rows="{@skip}">  
>    select * from person where id={@id}
>   </query> 
> If it is not difficult to get it working I could maybe fix it.

Because {@...} processing is only done for the query text nodes, not the
query's attribute node values. I strongly suggest you move to using XSP
and the XSP SQL taglib instead as it will likely make your life much
easier in this regard.

- donald


Mime
View raw message