- This topic has 3 replies, 2 voices, and was last updated 14 years, 2 months ago by support-shalini.
-
AuthorPosts
-
chitra_cancerMemberHi,
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>
support-shaliniMemberChitra,
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
chitra_cancerMemberHi 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.
support-shaliniMemberChitra,
Hope that the link will help you with the issue.
Do let us know if you have any issues. -
AuthorPosts