Niether solution works...
The expression is never evaluated. The output is:
<select name="historyItems[2].scheduleTypeId"
onchange="addTableRow('historyTable','s<c:out value='${status.index}'/>')"
class="dropdowns2">
"Abdullah Jibaly" <[EMAIL PROTECTED]>
14/04/2005 10:06 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List" <[email protected]>
cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)
Subject: RE: JSTL simply love it however ...
Classification:
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: [email protected]
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]