Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use html:optionCollection inside a c:forEach  RSS feed

 
deepa anandan
Greenhorn
Posts: 24
  • 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}" varStatus="status">
<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" />
</html:select>
</td>
<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)

</tr>

</c:forEach>
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 " />

</html:select>



My problem is with .How to use <html ptionCollection > inside a <c:forEach>��.
kindly help me with some inputs.
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try replacing the name of the optionCollection tag from "E1001Form" to "sFPBean" since you want to retrive the collection of language from each object in standardFactorParamBeanList. You have to use the exported object in forEach tag.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!