RE: Array of submit buttons

2019-02-16 Thread Yasser Zamani
>From: Prasanth 
>Sent: Friday, February 15, 2019 3:02 AM
>To: Struts Users Mailing List 
>Subject: Array of submit buttons
>
>Hi,
>
>I have a form with tabular data and need to have delete buttons for each row. 
>So
>have a ArrayList in the action and the form has name="delete[%{#rowNumber}]" value="Delete"/> inside an iterator. When the
>user clicks on the Delete button the ArrayList was not populated. So
>changed the ArrayList to a Map. Interestingly the map is populated but the 
>value
>in the map is a String array, rather than a single String, with one element 
>having
>string Delete.
>
>Do s:submit work differently from s:textfield when it comes to saving data to
>ArrayList or Map?


No, AFAIK finally both are http parameters.

I expect ArrayList to work also e.g. for rowNumber=3, I expect delete={null, 
null, null, "Delete"} :( Could you please set devMode and increase log levels 
to WARN and check the output? What Struts version do you use?

Regards.


Array of submit buttons

2019-02-14 Thread Prasanth
Hi,

I have a form with tabular data and need to have delete buttons for each row. 
So have a ArrayList in the action and the form has  inside
an iterator. When the user clicks on the Delete button the ArrayList 
was not populated. So changed the ArrayList to a Map. Interestingly the map is 
populated but the value in the map is a
String array, rather than a single String, with one element having string 
Delete.

Do s:submit work differently from s:textfield when it comes to saving data to 
ArrayList or Map?

Thanks,
Prasanth