You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Parvez Sayeed <pa...@hotelinfosys.com> on 2002/08/23 22:30:02 UTC
Can you have Scriptlet or within a Struts-tag 'eleme
nt'
Hi,
I was trying to do the following:
<logic:iterate id="someId"
type="some.class"
name="someName"
indexId="someIndex" // Used below in the select
property=someProp>
<bean:write property="prop1">
...
...
<html:select
name="beanName"
property="propOne"
onchange="optionChanged(<%=someIndex%>);"> // Used here in a
javascript function call
.....
.....
</html:select>
....
....
</logic:iterate>
Apparently this does not work. Is it at all possible? if not, can this be
accomplished some other way?
Thanks.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Can you have Scriptlet or within a Struts-tag 'element'
Posted by mike m <st...@wryse.com>.
Parvez,
You can use a scriptlet (but not a bean). Any string text must also be part
of the scriptlet, i.e., the scriptlet must be the entire value.
This should work for you:
onchange="<%= "optionChanged(" + someIndex + ");" %>"
Mike
-----Original Message-----
From: Parvez Sayeed [mailto:parvez.sayeed@hotelinfosys.com]
Sent: Friday, August 23, 2002 4:30 PM
To: Struts Users Mailing List
Subject: Can you have Scriptlet or <bean:write> within a Struts-tag
'element'
Hi,
I was trying to do the following:
<logic:iterate id="someId"
type="some.class"
name="someName"
indexId="someIndex" // Used below in the select
property=someProp>
<bean:write property="prop1">
...
...
<html:select
name="beanName"
property="propOne"
onchange="optionChanged(<%=someIndex%>);"> // Used here in a
javascript function call
.....
.....
</html:select>
....
....
</logic:iterate>
Apparently this does not work. Is it at all possible? if not, can this be
accomplished some other way?
Thanks.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>