Hi here is another question:
I searched the internet for information about the radio tag, and this is all I found so I put it in my code
<s:radio name="..." list="myArray" />
The above displays all the elements of the array with radio buttons. My problem is that they are not being aligned when they are displayed.
This is my problem:
I have an iterator and a list with objects:
<s:iterator value="listOfObjects"> <s:property="property_1"> <s:property="property_2"> <s:property="property_3"> <code to be added /> </s:iterator>
The above creates a table and each row has the properties of each object in the list. I want each row, to have a radio button at the last column. All the radio buttons will have the Same name and value will be one of the properties of the object in each line. But I cannot use the struts 2 radio tag:
<s:radio name="..." list="myArray" /> If I write this:
<s:iterator value="listOfObjects"> <s:property="code"> ................ <s:radio name="selectedCode" list="myArray" /> </s:iterator>
In each row I will have all the elements of the array.
I now how to do this using for-loop and simple html radio tag. Also I know how to do it with Struts 1 radio button tag. If I remember correctly you can iterate and create in each row a single radio button and take the values from the object your are iterating.
But in Struts 2 the "list" attribute is mandatory in the radio tag. So I cannot create a single radio button and I don't know how to iterate the "listOfObjects" in order to create a single radio button in each row.
<s:radio name="..." list="myArray" /> put all the radios in One table cell.
If you understand my problem any help will be appreciated