cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Neuenschwander" <a...@andi.ch>
Subject ESQL logicsheets problem with no-results tag
Date Fri, 15 Feb 2002 17:50:12 GMT
I encoutered (probably) a small bug in the esql logicsheet.
It's not possible any more the execute a query in an no-results element:

Cocoon 2.0:
-----------
} else {
_esql_query.position = _esql_query.statement.getUpdateCount();
if (_esql_query.position &gt;= 0) {
<xsl:apply-templates select="esql:update-results/*"/>
}

Cocoon 2.0.1:
-------------
} else {
int _esql_update_count = _esql_query.getStatement().getUpdateCount();
if (_esql_update_count &gt;= 0) {
<xsl:apply-templates select="esql:update-results/*"/>
}

I tried this nested query:
...
<esql:execute-query>
   <esql:query>
      a simple query...
   </esql:query>
   <esql:results>
      <esql:row-results>
         some results
      </esql:row-results> 
   </esql:results>
   <esql:no-results>
      if no results execute another query
         <esql:execute-query>
             another statement
         </esql:execute-query>
   </esql:no-results>
</esql:execute-query>
...

The problem here is that the compiler won't compile this xsp page, cause
the int _esql_update_count is already defined in the previous query.

Is it possible to change the above code from Cocoon 2.0.1 to:
Cocoon 2.0.1: (fix)
-------------
} else {;
   if (_esql_query.getStatement().getUpdateCount() &gt;= 0) {
     <xsl:apply-templates select="esql:update-results/*"/>
   }

Then it is possible to execute further sql queries in the no-results tag.
(As it was in the previous version of cocoon)



Best Regards,

Andi


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message