• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

JSTL radio button

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Below is what i need. I want to set the value dynamically. ie when status.value == 0 i should set vale for radio button as "0".

<spring:bind path="case.needToEdit.referralSubmitted">
<span><form:radiobutton path="referralSubmitted" value="0" /></span> No   
<span><form:radiobutton path="referralSubmitted" value="1" /></span> Yes
</spring:bind>


I tried like this,
<spring:bind path="case.needToEdit.referralSubmitted">
<span><form:radiobutton path="referralSubmitted" <c:if test="${status.value == 0}">value="0"</c:if> /></span> No   
<span><form:radiobutton path="referralSubmitted"<c:if test="${status.value == 1}">value="1"</c:if>/></span> Yes
</spring:bind>

But i get error saying unterminated tag. I think i cannot use value="0" inside c:if . Whatelse can i do?
Any help is appreciated.
 
Sheriff
Posts: 67695
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's not a JSTL tag, it's a Spring tag.

I've moved this to the Spring forum for you.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic