facebook

Spring validation

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #310696 Reply

    Hi,
    The followingcode is piece of my Jsp file. Here there are five values for the checkbox and one of the value out of 5 is NO. So if the user checked the NO checkbox then rest of the 4 checkboxes should be disabled. Nothing but toggle on/off. I’m sending as list of values thru Map.add(“adverseEvents”,”list of values from table”) to JSP form. But eventsMap is Set variable inside my XXXXEditForm.java file. If No is not selected then user can able to select more than one value (ie they can check more than one checkbox).The following code is working fine ie the user can select morethan one check box. but i don’t know how to make it work if user choose “NO”. Among of the five values one of the item is other, so if user choose other then i need to show a textbox for user input, that is also working fine.
    Any help would be appreciated.

    Thanks in Advance.

    <tr>
    <td><spring:message code=”adverseEvent”/>:</td>
    <td>
    <table border=”0″>
    <c:forEach var=”ae” items=”${adverseEvents}”>
    <tr>
    <td width=”10″><form:checkbox path=”eventsMap[‘${ae.integerValue}’]” /></td>
    <td>${ae.stringValue} <c:if test=”${ae.settingName==’OTHER’}”><form:input path=”eventsNotesMap[‘${ae.integerValue}’]” /></c:if></td>
    </tr>
    </c:forEach>
    </table>
    </td>
    </tr>

    #310704 Reply

    Chitra,
    This looks more like a logical issue.
    The only resolution that I can think of is using java script to restrict the user on the client side. This can be done by adding onclick events to your check boxes.
    Please refer to the following link for further reference –
    http://forum.springsource.org/archive/index.php/t-44460.html

    #310715 Reply

    Hi Shalini,

    Thank you so much. Yes, you are right , it is more of logical issue. I’ll follow the link and try to solve. Since i’m new to this spring Framework, it’s taking more time for me to do as i don’t have much. That’s y i posted it here.

    Thanks,
    Chitra.

    #310788 Reply

    Chitra,
    Hope that the link will help you with the issue.
    Do let us know if you have any issues.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Spring validation

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in