You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by gd...@cmhc-schl.gc.ca on 2005/04/14 14:58:52 UTC

JSTL simply love it however ...

I have started to use JSTL this week. I simply love it !!!
However, I have one small problem that I cannot seem to get working.

Here is a snippet of code that works fine:
<c:forEach items="${dynaCWWHistoryForm.map.historyItems}" var=
"historyItems" varStatus="status">
   <tr valign="top">
      <td id="c<c:out value='${status.index}'/>2">
         <c:forEach items="${dynaCWWHistoryForm.map.scheduleTypes}" var=
"option">
            <html:select name="historyItems" property="scheduleTypeId" 
indexed="true" styleClass="dropdowns2">
               <html:optionsCollection name="dynaCWWHistoryForm" property=
"scheduleTypes"
                  label="label" value="value"/>
            </html:select>
       </td>
   </tr>
</c:forEach>



What I need to do is add an onChange event for the <html:select> tag such 
as:
<c:forEach items="${dynaCWWHistoryForm.map.historyItems}" var=
"historyItems" varStatus="status">
   <tr valign="top">
      <td id="c<c:out value='${status.index}'/>2">
         <c:forEach items="${dynaCWWHistoryForm.map.scheduleTypes}" var=
"option" varStatus="optionStatus">
            <html:select name="historyItems" onchange=
"addTableRow('historyTable','s_SOMETHING_HERE')"
              property="scheduleTypeId" indexed="true" styleClass=
"dropdowns2">
               <html:optionsCollection name="dynaCWWHistoryForm" property=
"scheduleTypes"
                  label="label" value="value"/>
            </html:select>
       </td>
   </tr>
</c:forEach>

Where the SOMETHING_HERE would need to be <c:out value='${status.index}'/>
.
Is this possible?

Any help would be appreciated.
- Glenn