First of all the subject should've read "scripting events passed as parameters". I'm now responding to my own question :) - this will do it - not sure if this is a bug in Struts2 or not though: <@s.textfield theme="simple" name="name1" id="id1" cssClass="textfield" value="value1"> <@s.param name="onclick">myjsfunction();</@s.param> </@s.textfield>
--- On Sat, 9/12/09, red dog <redwhite_...@yahoo.com> wrote: From: red dog <redwhite_...@yahoo.com> Subject: scripting paramaters passed as parameters To: user@struts.apache.org Date: Saturday, September 12, 2009, 12:16 PM Hello, I'm new to this mailing list although I'm using Struts2 for quite some time. I am stuck right now and I decided to ask a quick question: Is it possible to generate an input field (as well as any other fields) by passing an onclick event for example as parameter? It doesn't seem to be working for me... I'm using Struts2.1.6 + freemarker as you can see bellow. <@s.textfield theme="simple" name="name1" id="id1" cssClass="textfield" value="value1"> <@s.param name="onclick" value="myjsfunction();" /> </@s.textfield> Thank you.