Announcement Announcement Module
Collapse
No announcement yet.
List and RadioButton Group Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • List and RadioButton Group

    Hi,

    I have a problem selecting only one radio button when the list of radio buttons is displayed dynamically. I need a radio button group like functionality.

    Also when the form gets submitted i want to retrieve the updated selection.

    consider the follwing scenarios customer has a list of adrresses and out of which one address can be active.

    something like the following ...

    <form:form commandName="customer" method="post">
    <c:forEach items="${customer.address}" varStatus="addressRow">
    </br>
    <spring:bind path="customer.address[${addressRow.index}].active">
    <form:radiobutton path="${status.expression}" />
    <input type="checkbox" name="<c:out value="${status.expression}"/>" value="${status.value}"
    <c:if test="${status.value}">checked</c:if>/>
    </spring:bind>

    </br>
    </c:forEach>
    <input type="submit" name="update" value="update" />
    </form:form>

    If we require radiobutton group like functionality then we need to have same name to all the radio buttons (name="<c:out value="XXXX"), but when the values are submitted back to the server with this approach then we dont get new selection



    How to get the desired behviour

  • #2
    I have the same question. Any solution?

    Comment

    Working...
    X