aspose file tools*
The moose likes Struts and the fly likes VALUE Property of RADIO-RENDERING ISSUE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "VALUE Property of RADIO-RENDERING ISSUE" Watch "VALUE Property of RADIO-RENDERING ISSUE" New topic
Author

VALUE Property of RADIO-RENDERING ISSUE

KRISH DOSS
Greenhorn

Joined: Feb 16, 2002
Posts: 19
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

Joined: Nov 09, 2000
Posts: 6450
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

Joined: Nov 09, 2000
Posts: 6450
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

Joined: Feb 16, 2002
Posts: 19
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: VALUE Property of RADIO-RENDERING ISSUE