Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I fill the radio button value from indexId bean

 
Simon Birch
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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 ]
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic