File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes retrieving data from logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "retrieving data from logic:iterate" Watch "retrieving data from logic:iterate" New topic

retrieving data from logic:iterate

John Smith

Joined: Oct 07, 2003
Posts: 15
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"/>
<td><bean:write name="types" property="key"/>=<bean:write name="types" property="value"/></td>
Jason Menard

Joined: Nov 09, 2000
Posts: 6450

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?
I agree. Here's the link:
subject: retrieving data from logic:iterate
It's not a secret anymore!