• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I fill the radio button value from indexId bean

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to produce a list of items in a page by iterating over a List of those items. As long as I don't try to use a radio button, the list works fine. Unfortunately, the radio button is somewhat essential.

Here is a snippet of the code from the Action (by the way reportName is a misnomer at the moment - it's supposed to be the report index number)


The page contains the following:


With this code, I get a JSP compilation error appearing in the web page.



I've tried using an ordinary <input> tag with the same bit of script used in the html:radio tag above - and it lists fine, but doesn't initialise the radio button.

I must be doing something daft - but I've no idea what it is. Can anyone point me in the right direction (or even solve the problem!).

Thanks in advance.

[ Jess added new lines in the error message so the screen doesn't get stretched too far ]

[ January 24, 2005: Message edited by: Jessica Sant ]
[ January 24, 2005: Message edited by: Simon Birch ]
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this:
<td><html:radio name="reportDefinition" property="reportName" value='<%= indexNumber %>'/></td>
 
Simon Birch
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Marc. Unfortunately, when I tried that, I got an almost identical error to the one I posted previously. Here it is (with line breaks this time )


Does this point to me doing something daft that is preventing the <%=indexNumber%> from working?
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doh! It's looking for a String, not an Integer.

Try
'<%= indexNumber.toString() %>'
[ January 24, 2005: Message edited by: Marc Peabody ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic