• 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

retrieving data from logic:iterate

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been trying to get some resources similar to my case, but i can't find any answers from anywhere. It would be very grateful if someone can solve this problem. I am just trying to retrieve data contained in iterate and display it in JSP by using logic:iterate tag. I can display it from bean:write, but i can't from html:radio tag.


DynaBean dynaForm = (DynaBean)form;
Map value = new HashMap();
value.put("2202", new AMSLabelValueBean("Client"));
dynaForm.set("field", value);
value.put("2203", new AMSLabelValueBean("Insurance"));
dynaForm.set("field", value);

request.setAttribute("messageTypes", value);


AMSLabelValueBean class contains setter and getter for 'label' field.



<logic:iterate id="types" name="messageTypes">
<bean efine id="labelKey"><bean:write name="types" property="key"/></bean efine>
<html:radio property='<%="field("+ labelKey + ")" %>' idName="types" value="label"/>
<tr>
<td><bean:write name="types" property="key"/>=<bean:write name="types" property="value"/></td>
</tr>
</logic:iterate>
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"boogi",

Your display name, boogi, is in violation of the JavaRanch naming policy We request that you change it in order to comply with this policy. Maybe something like "Caesar Kim", your display name before you changed it, would be more appropriate?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic