Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

VALUE Property of RADIO-RENDERING ISSUE

 
KRISH DOSS
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
The value property of radio tag
does not show the actual value
from collection.Instead it shows
as
<input type="radio" name="radioField" value="<bean:write name='mapID' property='key'/>">
<table>
<logic:iterate id="mapID" name="utilMap" property="salutationMap" scope="session">
<tr>
<td>
<html:radio property="radioField" value="<bean:write name='mapID' property='key'/>"/>
<bean:write name="mapID" property="value"/>
</td>
<tr>
</logic:iterate>
</table>

What is wrong in this code?
thanks
krishna
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't nest the <bean:write> tag inside your <html:radio> tag like that.
Since as I see by the two other posts you made on this same question that you are using <logic:iterate>, you might be able to do something along the lines of:
<html:radio property="radioField" value="<%= ((MyClass)mapID).getKey() %>"/>
[ June 14, 2002: Message edited by: Jason Menard ]
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just noticed you asked the same question three different ways in three separate threads, including this one, within the space of a few minutes of each other. I can assure you once is generally sufficient.
I also suggest that there is little in Struts a bit of trial and error as well as time spent pouring over the docs can't solve, particularly with regards to the custom tags, which is where you seem to be having most of your issues. Keeping a little struts test project where I could try out different ideas outside of my main project helped me immensely to work out these little problems when I was first learning Struts.
[ June 14, 2002: Message edited by: Jason Menard ]
 
KRISH DOSS
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really I am sorry about the way I posted messages.
Since I faced different types of errors , I posted in that way.
Thanks for your advise.
krishna
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic