cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enke, Michael" <michael.e...@wincor-nixdorf.com>
Subject xsp content in a method possible?
Date Fri, 26 Apr 2002 09:26:05 GMT
Hi,
I have following problem:
Usually we have xsp like this:

<xsp:page>
<page>
...
<esql:execute-query>
...
</esql:execute-query>
...
</page>
</xsp:page>

Because I have to repeat often the execute-query (with different arg) my idea was to write:

<xsp:page>
<xsp:logic>
void myMethod(MyObject myArg) {
<esql:execute-query>
...
</esql:execute-query>
}
</xsp:logic>
<page>
...
<xsp:logic>
myMethod(myArg);
</xsp:logic>
...
</page>
</xsp:page>

Because I get compilation errors I gave a second argument to myMethod:
myMethod(MyObject myArg, AttributesImpl xspAttr) and call myMethod(myArg, xspAttr);

Now compilation is ok, but the tags inside the method are wrong expanded.
I expected to see:
    if (_esql_query != null) {
      _esql_queries.push(_esql_query);
    }
    _esql_query = new EsqlQuery( _esql_connection, String.valueOf(<xsl:copy-of select="$query"/>)
);
    ...
but instead in the generated code I find:
    this.contentHandler.startElement(
      "http://apache.org/cocoon/SQL/v2",
      "execute-query",
      "esql:execute-query",
      xspAttr
    );
    xspAttr.clear();
    ...

Is there a way to proceed as I expected?

Regards,
Michael

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


Mime
View raw message