Hi again,

I discover debugging my application that the error is in the moment on tag s:select renders it at JSP.
I change my code to:
<s:select name="filtroRegiao" list="todasRegioes" listKey="id" listValue="descricao" headerKey="-1" headerValue=" " value="%{filtroRegiao.toString()}"/>
and works!!!
But in the first time when I enter in the page, filtroRegiao is null and in my console appears: WARNING: Caught an exception while evaluating expression 'filtroRegiao.toString()' against value stack
java.lang.NullPointerException: target is null for method toString

Anyone have tips for me?

Thanks,

Alexandre Lima

----- Original Message ----- From: "Alexandre Mendonça Lima" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Monday, January 22, 2007 9:57 AM
Subject: [S2] Tag select have problems


Hi everyone,

I got last version Struts 2.0.3 today and updated now my application but one page is gone wrong.
In this page, I have the code:
<s:select name="filtroRegiao" list="todasRegioes" listKey="id" listValue="descricao" headerKey="-1" headerValue=" " /> My Action class have two atributes: todasRegioes is a java.util.List and filtroRegiao is a java.lang.String. The list todasRegioes have instances from class Regiao which have atributes id and descricao. When I submitted my form to same page for refresh it, the select doesn't show the value selected, always show the value setting in headerKey.
Anyone can help me?

Alexandre Lima

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to