You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bugs_ <bu...@centrum.cz> on 2008/02/27 12:23:08 UTC

variable in Struts 2 tag

In JSP page:
<%
String onClick = ...
%>
<s:submit theme="simple" name="submit" value="submit" onclick="<%= onClick
%>" />

If i try to display jsp page, I get messege: "attribute onclick does not
accept any expressions"

I don't know how to display content of variable onClick into attribute
onclick.
It is probably a trivial question, but I can not find any solution.
-- 
View this message in context: http://www.nabble.com/variable-in-Struts-2-tag-tp15711298p15711298.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: variable in Struts 2 tag

Posted by bugs_ <bu...@centrum.cz>.


--- bugs_ <bu...@centrum.cz> wrote:
> In JSP page:
> <%
> String onClick = ...
> %>
> <s:submit theme="simple" name="submit" value="submit" onclick="<%= onClick
> %>" />
> 
> If i try to display jsp page, I get messege: "attribute onclick does not
> accept any expressions"
> 
> I don't know how to display content of variable onClick into attribute
> onclick.

Are you specifically trying to generate dynamic JavaScript?

Dave

I am rewriting an existing application from Struts 1 to Struts 2. Scriptlet
generate code into variable "onClick" and i need get it's content into
attribute onclick of tag <s:submit>
-- 
View this message in context: http://www.nabble.com/variable-in-Struts-2-tag-tp15711298p15714434.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: variable in Struts 2 tag

Posted by Dave Newton <ne...@yahoo.com>.
--- bugs_ <bu...@centrum.cz> wrote:
> In JSP page:
> <%
> String onClick = ...
> %>
> <s:submit theme="simple" name="submit" value="submit" onclick="<%= onClick
> %>" />
> 
> If i try to display jsp page, I get messege: "attribute onclick does not
> accept any expressions"
> 
> I don't know how to display content of variable onClick into attribute
> onclick.

Are you specifically trying to generate dynamic JavaScript?

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org