I think this is occurring because of the order in which logic sheets and XSP
code are generated. The flow works as follows:
1. XSP is called
2. Logic Sheets are transformed and combined with XSP
3. XSP is compiled to Java
4. Java logic is run
So, the logic sheet can't interpret the sectionId variable as it's being
transformed. This will be done after the file is compiled to java. If you
change your logic sheet as follows it should work:
<xsl:template match="section:edit">
...
<esql:query>select * from section where
id=<xsp:expr>sectionId</xsp:expr></esql:query>
...
</xsl:template>
Chris
-----Original Message-----
From: Otmar Vobejda [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 09, 2003 8:12 PM
To: [EMAIL PROTECTED]
Subject: Dynamic parameter for logicsheet
Hi people, I don't understand one thing:
in XSP file I have this piece of code:
<xsp:logic>
String sectionId = 5;
<section:edit>
<section:id><xsp:expr>sectionId</xsp:expr></section:id>
</section:edit>
</xsp:logic>
this "calls" template "section:edit" in logicsheet, which is defined:
<xsl:template match="section:edit">
...
<esql:query>select * from section where
id=<xsl:value-of select="section:id"/></esql:query>
...
</xsl:template>
It should send to SQL server query 'select * from section where id=5',
But to ESQL it sends query 'select * from section where id=sectionId'.
WHY??? And why to do it correctly?
Thanx!
osup
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]