i have many select boxes on the page, which are genereted by js.
<select class='form-control mySelector' name='crossStageForm.teamIds[i]'>"
<option value='${null}'>choose team</option>
<c:forEach items='${crossStageForm.teamTOs}' var='teamTO'>
<option value='${teamTO.id}' label='${teamTO.title}'/>
</c:forEach>
</select>
i need to save ids into array of Long values of spring form. this is my form with array
public class CrossStageForm {
//other fields
private Long[] teamIds;
//getters and setters
}
also i think maybe in js i should generate also constructions for saving i value and then using it as index for array, but anyway i'm not sure if i'm using right way for saving values from select to array . So the question is about many select boxes and saving it's values to array