You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Saif Khaja <ks...@hotmail.com> on 2000/09/23 00:41:40 UTC
xsp string to integer..
Hi,
I need to get the integer value the esql - column returns and pass that
integer value to a method. The resultant String is the tag value.
The Code Snippet:
...
<esql:results>
.........
<Model><xsp:logic>Util.EnumToStr( <esql:get-int column="Model"/>
);</xsp:logic></Model>
.........
</esql:results>
...
And I get the following error message:
java.lang.Exception: XSP Java Compiler: Compilation failed for
_esqlTest.java
136: Incompatible type for method. Can't convert java.lang.String to int.
Util.EnumToStr(""+_esql_session.resultset.getInt("Model"));
I even tried to convert the String to int but it doesnt work. Any
suggestions, how I can achieve this.
Thank you,
saif.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
Re: xsp string to integer..
Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 22 Sep 2000, Saif Khaja wrote:
> Hi,
> I need to get the integer value the esql - column returns and pass that
> integer value to a method. The resultant String is the tag value.
> The Code Snippet:
>
> ...
> <esql:results>
> .........
> <Model><xsp:logic>Util.EnumToStr( <esql:get-int column="Model"/>
> );</xsp:logic></Model>
> .........
> </esql:results>
> ...
>
> And I get the following error message:
>
> java.lang.Exception: XSP Java Compiler: Compilation failed for
> _esqlTest.java
> 136: Incompatible type for method. Can't convert java.lang.String to int.
> Util.EnumToStr(""+_esql_session.resultset.getInt("Model"));
>
>
> I even tried to convert the String to int but it doesnt work. Any
> suggestions, how I can achieve this.
hmm. for some reason, i'm casting the int to a string when returning it
from esql:get-int. i wonder what my rationale for that was? well, until i
figure it out, you can modify your copy of esql.xsl by removing the ""+
from the get-int method in the logicsheet.
- donald