cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JEULIN Olivier <olivier.jeu...@xml-ais.com>
Subject RE: esql:query + esql:parameter bug
Date Thu, 19 Jul 2001 13:41:33 GMT
Here is an example of what I did.
This works inside a "xsp:logic" tag... In your case, you may use xsp:logic
instead of xsp:expr

* using a variable (_ensemble) :
<xsp:logic>
if (<session:get-attribute name="counter"/> != null) {
  [some code here]
...
  <esql:query>
	select i.idtitle, t.xml
	from <xsp:expr>_ensemble</xsp:expr> identifiant i, title t
  	where i.idtitle = t.idtitle <xsp:expr>_whichGroup + _like</xsp:expr>
  </esql:query>
</xsp:logic>

* using a taglib: this is the same thing, because taglib elements are
expanded to *java code*
just replace _ensemble above with <request:get-parameter name="Alex"/>

Olivier

> -----Message d'origine-----
> De : Arnaud Bienvenu [mailto:arnaud.bienvenu@generasound.com]
> Envoyé : jeudi 19 juillet 2001 15:21
> À : cocoon-users@xml.apache.org
> Objet : esql:query + esql:parameter bug
> 
> 
> If I write, for example :
> <esql:query>
>  select * from space where person like <esql:parameter 
> type="string">Alex</esql:parameter>
>  ...
> (I known I don't need the esql:parameter tags here, but see below...)
> 
> Then I get an error :
> Error compiling index_xsp: Line 303, column 37: ')' expected.
> 
> Actually, the generated code is :
> try {
>   _esql_query.prepared_statement.setString(1,
>      this.characters("Alex"););
> }
> 
> which is obviously incorrect. The generated code gets more 
> broken if you use
> something like
> <esql:parameter><request:get-parameter name="Alex"/></esql:parameter>
> 
> I think this is a big problem, and if some developer manage 
> to fix it, he
> would be a real man (or woman)...
> 
> -- 
> Arnaud Bienvenu
> http://www.generasound.com/
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message