I didn't know about Type Conversion. I found the response here:
http://www.opensymphony.com/webwork/wikidocs/Type%20Conversion.html
It's great!

Thanks!
 
Att,

Luciano


-----Mensagem original-----
De: Luciano Costa [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 2 de julho de 2007 12:08
Para: 'Luciano Costa'
Assunto: RES: [S2] Why is it so difficult ?

In ActionContext.getParameters I'm getting different vars to each array
item.. as follows:

VAR "poll.pollOptions[0].option" WITH VALUE="option 0 description"
VAR "poll.pollOptions[1].option" WITH VALUE="option 1 description"
VAR "poll.pollOptions[2].option" WITH VALUE="option 2 description"

Any help is very appreciated!

Thanks,

Luciano

-----Mensagem original-----
De: Luciano Costa [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 2 de julho de 2007 11:54
Para: 'Struts Users Mailing List'
Assunto: [S2] Why is it so difficult ?

Hi all,

I'm still trying to get binded these "poll.pollOptions[]" in my Action:

I think this should be easy.. but I'm suffering to get this working..

<@s.textfield name="poll.name" id="poll.name" />
<#assign rowIndex = 0>
<@s.iterator value="poll.pollOptions" >
        <@s.textfield name="poll.pollOptions[#{rowIndex}].option" />
        <#assign rowIndex = rowIndex + 1>
</@s.iterator>

The form is loaded correctly, but I can't get array data on pollOptions
after form submission.

Please help!


Thanks,

Luciano


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

Reply via email to