cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otmar Vobejda <>
Subject Re: Recursive reading from database
Date Wed, 05 Nov 2003 22:40:51 GMT
Maybe stupid question, but how to insert ESQL tags inside <xsp:logic> 
block? Next example is absolutly wrong:

<xsp:page ...>


        public void testMethod() {   

                <esql:query>select id, name from test</esql:query>
                        <esql:get-string column="id"/>
                        <esql:get-string column="name"/>



Christopher Painter-Wakefield wrote:

>No, your functions must be defined within an xsp:logic block, which will
>protect them from being the top user element in xsp:page.  The output won't
>occur until you call the function, which will be within your top user
>element.  So you should be able to get the output you are expecting.
>I have had problems in the past doing output from user functions, due to
>some xspAttr variable or some such not being available.  It seems to me
>that it was easy enough to fix, by passing the missing variable into the
>function call.  If that won't work, you can always fall back on building a
>list in Java via recursion, and returning that from your function.  Loop on
>the list in your main body to output.  But you should be able to do output
>from your functions, with a little work.
>                      Otmar Vobejda                                                  
>                      <>        To:
>                                               cc:                                   
>                      11/05/2003 03:48         Subject:  Re: Recursive reading from database
>                      PM                                                             
>                      Please respond to                                              
>                      users                                                          
>Thanx for your answer. I'm using mysql now and there is no similar
>feature as you said, I think.
>>ESQL elements don't have to be inside the top user element, at least
>Yes, it is maybe possible, that it can be outside the top user element, but
>if ESQL elements are generating some XML output, the top element of this
>output is taken as top user element and that's not good. If I want to use
>it recursively, it will generate uncorrect data. What i want to generate,
>can be something like this:
>             <element>blabla</element>
>             <element>- bleble</element>
>             <element>- - blibli</element>
>             <element>- blublu</element>
>             <element>blabla2</element>
>And what to do now... ? :)
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message