I haven't tested this code, but you can try

<%
        String s = //get s
        String onChangeFunction = "formSubmit(this.form," + s + ")";

%>
<html:select property="definition" onchange="<%=onChangeFunction%>">




The behavior you are describing may be a result of a JSP limitation where
you can only have a single expression rendered as an attribute value. I ran
across this same problem and the above solution seemed to fix things.



JavaServer Pages 1.2 Specification

JSP.2.13.1 Request Time Attribute Values

<snip>
The expression must appear by itself (multiple
expressions, and mixing of expressions and string constants are not
permitted).
Multiple operations must be performed within the expression.
</snip>


robert

> -----Original Message-----
> From: Nikolov. Dragomir [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 21, 2002 11:38 AM
> To: Struts Users Mailing List
> Subject: Tag || JSP problem
>
>
> Hello,
>       I am having the following code in a JSP file.
>
>       <html:select property="definition" onchange="formSubmit(this.form,
> <%=s%>)">
>           <html:options collection="<%=Constants.LIST%>" property="id"
> labelProperty="name"/>
>       </html:select>
>
> in the resulted HTML code I have the Constants.LIST replaced with its
> value, but
> the <%=s%> is not processed and is present as it is in the html.
> It look to me as a JSP compiler problem...
> Does anyone knows a workaround.
>
> Best Regards
> Dragomir
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


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

Reply via email to