cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Painter-Wakefield" <paint...@mc.duke.edu>
Subject Re: XSP code reuse problems
Date Tue, 04 Sep 2001 17:58:27 GMT

Alexandru,

look at your generated code, and I think you'll see why this doesn't work.
ESQL creates a number of local variables inside the populateDocument()
method, which it needs for its tags.  These local variables obviously
aren't available to other methods in the class.

-Christopher




Please respond to cocoon-users@xml.apache.org

To:   <cocoon-users@xml.apache.org>
cc:

Subject:  XSP code reuse problems


     Hello,
     Trying to implement the code reuse with the XSP method reusePart,
I've come into problems when the method should use the esql taglib.
     When I write a simple method, it works flawlessly and it's
reusable.
     But when I try to add a esql quey, I ran into problems.
     The pasted code below does not execute the esql part, and I think
this happend because the code fragment is locate above the <page> tag.

<xsp:logic>
private void TwoLevel(String param) throws SAXException {
     AttributesImpl xspAttr = new AttributesImpl();
     int k = 1;
     int idinf = 0;
     </xsp:logic>

     <esql:execute-query>
               <esql:query>
                    select * from v_inf where (idinf_inf is
null and idtype_inf=1) order by name_itm
               </esql:query>
   </esql:execute-query>

  <xsp:logic>
   <recordset1>
<xsp:expr>param</xsp:expr>
   </recordset1>
}
</xsp:logic>

               Alexandru







---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message