Re: XSP code reuse problems

2001-09-04 Thread Berin Loritsch
Christopher Painter-Wakefield wrote: > > 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 t

Re: XSP code reuse problems

2001-09-04 Thread Christopher Painter-Wakefield
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 Ple

Re: XSP code reuse between files

2001-09-03 Thread Mario Muja
Since my first start with Cocoon, I am searching for an easy way to store the result of an XSP page to a file for later reuse in other XSPs. I could not find a way to do this neither in the documentation nor in the mail archives. Has somebody out there already done this? Then please help us an

Re: XSP code reuse between files

2001-09-02 Thread Alexandru COSTIN
Thank your for your suggestion. I wonder though how can this mecanism be used when trying to reuse the XSP code between multiple files... I would like to avoid redefining the reusedPart method for everypage, as it's definition will remain unchanged

Re: XSP code reuse

2001-08-31 Thread Sylvain Wallez
Curious guy :) Have a look at the Java code generated for any XSP, and you'll understand : this a local variable that is used by the XSP engine to produce the attributes of XML elements. Since we have here a separate method, this local variable is out of scope, and we must therefore declare a

Re: XSP code reuse

2001-08-31 Thread Mario Muja
Hi Sylvain, thank you for this hint. I do not understand, why the following line is necessary. AttributesImpl xspAttr = new AttributesImpl(); Can you please explain this? Regards, Mario Sylvain Wallez wrote: > The capture taglib won't solve this problem, because the captured > content can'

Re: XSP code reuse

2001-08-31 Thread Sylvain Wallez
The capture taglib won't solve this problem, because the captured content can't be parameterized. To achieve this, you can put the reused part in a method defined in a block child of . Below is an example, based on simple.xsp form the samples. http://apache.org/xsp"; xmlns:xsp-req

Re: XSP code reuse

2001-08-31 Thread Mario Muja
Hi Alexandru, reusing part of an XSP result is something I plan to achieve with the new logicsheet CAPTURE.XSL. You will find it under src\org\apache\cocoon\component\language\markup\xsp\java in the source tree of the 2.0 and 2.1 branch. This logicsheet contains markup to copy part of an XSP t

RE: XSP code reuse

2001-08-31 Thread Orgalist
If you know the values of idtype-inf you will use, you can use this query : select * from v_inf where idtype_inf=6 OR idtype_inf=7 OR idtype_inf=8... or if the values follow each other ( 6,7,8,9...), use for(int i=6; i<=9; i++) { ... select...i ... } hope this will help. C. -Message d'origi