• 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

Problem with struts nested tags

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using struts nested:iterate tags. I am having a list having another list inside that(2 level).
I need to show second list values in Dropdown as options.
After submitting the page I am able to retrieve only fist list values. The sub list coming as null. How to persists sub list values. Can any body give me the sample jsp and action form code.
I am pasting the jsp code here for reference

In Form bean I am using ListUtils.lazyList() to populate the values .

<nested:iterate id="param" property="params" >
<tr>
<td>
<nested:define id="uiFieldLabelKey" property="uiFieldLabelKey" type="java.lang.String"/>
<nested:define id="maxWidth" property="maxWidth" type="java.lang.Integer"/>
<nested:define id="uiFieldWidth" property="uiFieldWidth" type="java.lang.Integer"/>
<nested:hidden property="paramDefId"></nested:hidden>
<nested:hidden property="isBound"></nested:hidden>
<span class="page_text"><bean:message key="<%=uiFieldLabelKey %>"/></span>
<nested:equal property="isMandatory" value="<%=String.valueOf(StringConstants.TRUE) %>"><span class="errortext"> *</span></nested:equal>
</td>
<td>
<nested:match property="uiFieldType" value="<%=StringConstants.UI_FIELD_TYPE_TEXT %>">
<nested:text property="paramOptionDesc" styleClass="form_text_box" size="<%=String.valueOf(uiFieldWidth) %>" maxlength="<%=String.valueOf(maxWidth) %>"></nested:text>
</nested:match>
<nested:match property="uiFieldType" value="<%=StringConstants.UI_FIELD_TYPE_DROPDOWN %>">
<nested:select property="paramOptionDesc" styleClass="form_dropdown" style ="width:182px;">
<nested:iterate property="options">
<nested:define id="paramOption" property="paramOption" type="java.lang.String"/>
<nested:define id="paramOptionsId" property="paramOptionsId" type="java.lang.Long"/>
<html:option value="<%=String.valueOf(paramOption) %>"><%=paramOption %></html:option>
</nested:iterate>
</nested:select></nested:match>
</td>
</tr>
</nested:iterate>

Thanks
Swetha
 
reply
    Bookmark Topic Watch Topic
  • New Topic