I encountered a similar issue before as well. I ended up always using the toString method. (Don't forget to check for null)
What I found was that when the Integers we small (5, 50, 100, ect...) the select box would match it correctly. However when the id was a larger Integer such as 10000 the select would not match it correctly without the toString. Is this the case with your data in the example that you gave? Marco On 6/8/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote:
They are both Integer. Rafael Dittberner Vincent Lin escreveu: > What is the data type of autoridade.orgao.codObjeto and > autoridade.cargo.codObjeto? > > On 6/7/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote: >> >> This is my code: >> >> <s:select name="autoridade.orgao.codObjeto" list="orgaos" >> listKey="codObjeto" listValue="nome" label="Orgão" >> value="%{autoridade.orgao.codObjeto.toString()}" /> >> >> <s:select name="autoridade.cargo.codObjeto" list="cargos" >> listKey="codObjeto" listValue="nome" label="Cargo" >> value="%{autoridade.cargo.codObjeto}" /> >> >> Someone please explain to me why in the first one i had to use >> toString() to make it work, but the second one works perfectly as is? >> >> -- >> Rafael Dittberner >> Brasília (DF) - Brasil >> >> --------------------------------------------------------------------- >> 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]