I think ${status.index} in place of s_SOMETHING_HERE would work fine.
Otherwise, try setting onChange="${addTableRow}" with addTableRow prior defined 
as:

<c:set var="addTableRow">addTableRow('historyTable','<c:out 
value="${status.index}" />')</c:set>

-Abdullah

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 14, 2005 7:59 AM
To: user@struts.apache.org
Subject: 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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to