On Tue, 26 Nov 2002, Derek Hohls wrote:
> Could you not have
>
> <xsp:logic>
> while (class1 = null) {
> </xsp:logic>
>
> <esql:connection etc />
>
> <xsp:logic>
> }
> </xsp:logic>
I don't think so, no, for the same reason you couldn't have:
<xsp:logic>
<foo>
</xsp:logic>
<esql:connection etc />
<xsp:logic>
</foo>
</xsp:logic>
The solution might be to move the XSP into an Action, or:
<esql:connection>
<esql:pool>autorevs_pool</esql:pool>
<esql:execute-query>
<esql:query>select * from profile where SELECTION
='<xsp:expr>currentSelection</xsp:expr>'</esql:query>
<esql:max-rows>1</esql:max-rows>
<esql:results>
<esql:row-results>
<xsp:logic>
class1 = <esql:get-string column="CLASS"/>;
engine1 = <esql:get-string column="ENGINE_TYPE"/>;
<title><xsp:expr>class1</xsp:expr></title>
<heading><xsp:expr>engine1</xsp:expr></heading>
</xsp:logic>
</esql:row-results>
</esql:results>
<esql:no-results>
<xsp:logic>
if (currentSelection.equals("Strongly Agree")) {
currentSelection = "Agree";
} else if (currentSelection.equals("Agree")) {
currentSelection = "Undecided";
} else if (currentSelection.equals("Undecided")) {
currentSelection = "Disagree";
} else {
currentSelection = null;
class1 = "error";
}
</xsp:logic>
</esql:no-results>
</esql:execute-query>
</esql:connection>
<xsp:logic>
if (class1 != null) {
// do something
}
</xsp:logic>
?
Andrew.
--
Andrew Savory Email: [EMAIL PROTECTED]
Managing Director Tel: +44 (0)870 741 6658
Luminas Internet Applications Fax: +44 (0)700 598 1135
This is not an official statement or order. Web: www.luminas.co.uk
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>