• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to use html:optionCollection inside a c:forEach

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem description:::::

E1001Form.standardFactorParamBeanList= is a list of standardFactParamBean beans.

(each standardFactParamBean contains 4 things.

1. arraylist of strings named(languageClassificationCollection)

2. string CommentStepCount

3. string NewManual

4. string ReplacementsManual

With all respective getters and setters.


I need to get each bean from the standardFactorParamBeanList so I am using (c:forEach var = "sFPBean" items = "${requestScope.E1001Form.standardFactorParamBeanList}����..)

And from each bean I want the 1st table column to be filled by combobox of languageClassificationCollection

2nd column with commentStepCount

3rd with newManual

4th with replacementsManual

Following is the screen shot

So I am using following code.everything is working fine but I am unable to fill the combo-box with property=" sFPBean.languageClassificationCollection".

<c:forEach var = "sFPBean" items = "${requestScope.E1001Form.standardFactorParamBeanList}"


<tr class="right">

<td class="blackFontLargeFontAlignCenter"><c ut value="${status.count}" /></td>

<td class="cellWhite cellLessPadding" width="18%">

<html:select property="bareMachine" style="width:100%">

<html ptionsCollection name="E1001Form" property=" sFPBean.languageClassificationCollection" />



<td class="cellWhite"><input type="text" value='<c ut value="${ sFPBean.commentStepCount}" />'/></td>

<td class="cellWhite"><input type="text" value='<c ut value="${ sFPBean.newManual }" />'/></td>

<td class="cellWhite"><input type="text" value='<c ut value="${ sFPBean.replacementsManual }" />'/></td>

(similarly 6more rows)



Language cmmnt new rpl

Classification S.Cnt Manual Manual

Instead of this if I make a arraylist of strings in E1001Form itself, and then display here, it is going fine as with the following tag.

<html:select property="bareMachine" style="width:100%">

<html ptionsCollection name="E1001Form" property="languageClassificationCollection " />


My problem is with .How to use <html ptionCollection > inside a <c:forEach>��.kindly help me with some inputs.
Posts: 67451
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As <html:select> is a Struts tag, this has been moved to the Struts forum.
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duplicate. See

Yes, my master! Here is the tiny ad you asked for:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic