You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Philippe Guillard <pg...@soociety.com> on 2004/03/08 09:40:49 UTC
esql:get-string and java String
Hi,
I found in user@cocoon archives somebody having the same problem that i
have today, and i don't understand the response given here (Do not know
how to replace "CDATA" and "cd_formula"). Can anybody help me?
Regards,
Phil
--------------------------------------------------------
esql:get-string and java String
Gabor Bartha cocoon-users@xml.apache.org
Tue, 01 Oct 2002 11:13:52 +0200
* Previous message: Sitemap returning blank html page
* Next message: esql:get-string and java String
* Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
________________________________________________________________________
Hi,
the java code:
String formula =
xspAttr.addAttribute(
"",
"column",
"column",
"CDATA",
"cd_formula"
);
this.contentHandler.startElement(
"http://apache.org/cocoon/SQL/v2",
"get-string",
"esql:get-string",
xspAttr
);
xspAttr.clear();
this.contentHandler.endElement(
"http://apache.org/cocoon/SQL/v2",
"get-string",
"esql:get-string"
);
;
If I try to use double () like this:
String formula = ((String)<esql:get-string column="formula"/>);
I got ')' expected error, the source in this case:
String formula = ((String)
xspAttr.addAttribute(
"",
"column",
"column",
"CDATA",
"cd_formula"
);
this.contentHandler.startElement(
"http://apache.org/cocoon/SQL/v2",
"get-string",
"esql:get-string",
xspAttr
);
xspAttr.clear();
this.contentHandler.endElement(
"http://apache.org/cocoon/SQL/v2",
"get-string",
"esql:get-string"
);
);
Regards,
Gabor
Christian Haul wrote:
>On 30.Sep.2002 -- 05:12 PM, Gabor Bartha wrote:
> >
>>Hi,>>
>>I want to use the esql:get-string method to initialize a java String
>>object like this:>>
>><xsp:logic>
>> String formula = <esql:get-string column="formula"/>;
>></xsp:logic>
>>
>>But I got incompatible types exception. If I tried to use casting:
>>
>><xsp:logic>
>> String formula = (String)<esql:get-string column="formula"/>;
>></xsp:logic>
>>
>>I got inconvertible types Exception.>>
>>How can I use that variable as a java String object?
>>
>>
>>I'm puzzled. Could you please post the lines from the resulting java>code generated by the XSP?>>
Chris.>-->C h r i s t i a n H a u l>haul@informatik.tu-darmstadt.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: esql:get-string and java String
Posted by Antonio Gallardo <ag...@agssa.net>.
Sorry, I tought:
<xsp:logic>
String formula = new String(<esql:get-string column="formula"/>);
</xsp:logic>
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: esql:get-string and java String
Posted by Antonio Gallardo <ag...@agssa.net>.
Try this:
<xsp:logic>
String formula = <xsp:expr><esql:get-string column="formula"/></xsp:expr>;
</xsp:logic>
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org