Struts 2 : redirect to action method on type conversion fail ?

2010-05-10 Thread Thomas Lulé
Hi, I've got a form with s:textfield mapped with Long variables in my action class. Also, my jsp displays some pre-computed information (that I retrieve from database in my action's method). When the user types letters in the number field, the type conversion fails, and the JSP is reloaded. But

Re: Struts 2 : redirect to action method on type conversion fail ?

2010-05-10 Thread Lukasz Lenart
Use Preparable interface instead http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To

Struts release 2.1.9

2010-05-10 Thread jake
Hi, When will there be a GA release of 2.1.9 or above? Cheers, Jake - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts 2 : redirect to action method on type conversion fail ?

2010-05-10 Thread Thomas Lulé
That interceptor looks great, but is there any way to access request parameters in the prepare() method ? The http request provides an archiveProfileId parameter and I use that parameter to load my object archiveProfile. 2010/5/10 Lukasz Lenart lukasz.len...@googlemail.com: Use Preparable

Re: Struts release 2.1.9

2010-05-10 Thread Lukasz Lenart
2010/5/10 j...@researchtogether.com: When will there be a GA release of 2.1.9 or above? Hope soon! We're planing to use Nexus to make a release and right now I'm waiting for access. Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl

Re: Struts 2 : redirect to action method on type conversion fail ?

2010-05-10 Thread Alex Rodriguez Lopez
Hi Thomas, use the paramsPrepareParams interceptor stack (or change yours), from struts-default.xml: !-- An example of the paramsPrepareParams trick. This stack is exactly the same as the defaultStack, except that it includes one extra interceptor before the

Re: Struts 2 : redirect to action method on type conversion fail ?

2010-05-10 Thread Thomas Lulé
It works. Thanks a lot Lukasz and Alex. 2010/5/10 Alex Rodriguez Lopez alo...@flordeutopia.pt: Hi Thomas, use the paramsPrepareParams interceptor stack (or change yours), from struts-default.xml: !-- An example of the paramsPrepareParams trick. This stack                 is exactly the

Re: Struts 2 : redirect to action method on type conversion fail ?

2010-05-10 Thread Thomas Lulé
One last thing : Even if everything works, I still get a stacktrace when I submit the form to save my object. I think that the params interceptor tries to set the properties of the object jspProfile I have in my form (with s:checkbox name=jspProfile.recpCheckErrorCount/ for example), before the

Re: Struts 2 : redirect to action method on type conversion fail ?

2010-05-10 Thread Thomas Lulé
Nevermind, my stacktrace came from that issue : https://issues.apache.org/jira/browse/WW-2850 2010/5/10 Thomas Lulé tho...@lule.fr: One last thing : Even if everything works, I still get a stacktrace when I submit the form to save my object. I think that the params interceptor tries to set

how to set default focus field in s:form ?

2010-05-10 Thread Emi Lu
Good afternoon, Struts1, I use html:form focus=field_name to focus a default field. For *struts2.1.8.1*, may I know the grammar of setting focus value for s:form please? s:form focus=field_name does not work. Thanks a lot! -- Lu Ying

Re: how to set default focus field in s:form ?

2010-05-10 Thread Paweł Wielgus
Hi Lu, does this help http://struts.apache.org/2.1.8.1/docs/form.html ? Search for focusElement in this text. Best greetings, Paweł Wielgus. 2010/5/10 Emi Lu em...@encs.concordia.ca: Good afternoon, Struts1, I use html:form focus=field_name to focus a default field. For *struts2.1.8.1*,

Re: how to set default focus field in s:form ?

2010-05-10 Thread Luis Martín Canaval Sánchez
I would like to know that aswell, so far I have been using javascript with jquery that is the lib that I use // somewhere inside the initial function $(input:text:visible:first).focus(); // or $(#othercontol).focus(); // if the first control is not a textbox. On Mon, May 10, 2010 at 15:52, Emi