• 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

ITERATE TAG-ISSUES

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am facing lot of issues in <html:iterate>
tag.I try to populate collection values as
label for radio buttons. Here is the code.

<table>
<logic:iterate id="mapID" name="utilMap" property="salutationMap" scope="session">
<tr>
<td>
<html:radio property="mapProp" value='<bean:write name="mapID" property="key"/>' />
<bean:write name="mapID" property="value"/>
</td>
<tr>
</logic:iterate>
</table>
I set the 'utilMap' Object ,which
contains getSalutationMap(), in session.
But i am getting following error.
javax.servlet.jsp.JspException: Cannot find bean under name org.apache.struts.taglib.html.BEAN
at org.apache.struts.taglib.html.RadioTag.doStartTag(RadioTag.java:189)
Can you explain me what went wrong?.
1. Is it required for a class ,referred in
iterate tag, to be set in request/session?.
2. Should i need to make any additions in
ApplicationResources.properties file?
Your guidance is highly appreciated.
thanks
krishna
 
KRISH DOSS
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem Fixed.
krishna
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Krishna,
Could you tell us what was wrong and how did u solve the problem? this could be helpful for others who are having the same problem.
thanks
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

you cannot referenct bean value this way...

<html:radio property="mapProp" value='<bean:write name="mapID" property="key"/>' />

if you want to put a dynamic value there , then you have to use jsp scriplet (or what it is) like this

<html:radio property="mapProp" value='<%= (mapID class name)mapID.getKey() %>' />

atleast i coudnt find any other way to solve these problem...
In this cases it realy is better to use som of these JSTL stuff..
 
reply
    Bookmark Topic Watch Topic
  • New Topic