Announcement Announcement Module
Collapse
No announcement yet.
form:radiobuttons wrong name index generated Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • form:radiobuttons wrong name index generated

    I have a c:forEach loop iterating a LazyList and generating the radiobuttons
    the tag within the loop is

    <c:forEach items="${collections}" var="item" varStatus="loop" >

    <form:radiobuttons path="opts[${loop.index}].opt}" id="opt" >

    </c:forEach>


    this generates the same name index in html for all the iterations

    <input type="radio" id="opt1" name="opt[0].opt">
    <input type="radio" id="opt2" name="opt[0].opt">
    <input type="radio" id="opt3" name="opt[0].opt">
Working...
X