Re: client validation isn't generated when using a VisitorFieldValidator annotation

2012-06-19 Thread Dave Newton
On Tue, Jun 19, 2012 at 12:58 PM, Shrinivas Parashar < shrinivas_paras...@symantec.com> wrote: > I am using visitorFieldValidator in my action class. Server Side > validation is working fine. But the problem is client side validation code > is not generated. > > One more problem with client side v

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread Dave Newton
On Tue, Jun 19, 2012 at 1:02 PM, Chris Pratt wrote: > If you want to handle parsing yourself, make your action properties take > "String" parameters and do the parsing in the action. > Probably better to do your own type converter, though, particularly if it's app-wide. Dave

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread Chris Pratt
If you want to handle parsing yourself, make your action properties take "String" parameters and do the parsing in the action. (*Chris*) On Tue, Jun 19, 2012 at 7:55 AM, Pierre TEMPLIER wrote: > Locale.FRENCH and Locale FRANCE should output something like 345 987,246 > > i can confirm that with

client validation isn't generated when using a VisitorFieldValidator annotation

2012-06-19 Thread Shrinivas Parashar
Hi, I am using visitorFieldValidator in my action class. Server Side validation is working fine. But the problem is client side validation code is not generated. One more problem with client side validation seen is the order of validation code generated is different than the expected. (If I move

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread Ɓukasz Lenart
2012/6/19 Pierre TEMPLIER : > I was able to register an application-wide DoubleConverter with > primitive type double this way : > == xwork-conversion.properties == > # syntax: = > double = com.company.app.DoubleConverter It isn't a hack, it's a normal way to do the things ;-) > it works but it

RE: ParamsInterceptor: is input "bean.getFoo('bar').name" supposed to work?

2012-06-19 Thread anw
Ok, here is my Java test case with an empty project and Struts 2.3.4: http://dl.free.fr/iE0hoDdIR Have a look to com.opensymphony.xwork2.interceptor.MyParamsTest: params.put("getBean('something').name", "That's not my name"); [...] // <--- !! test assertion failure assertNotSame("That's not m

RE: ParamsInterceptor: is input "bean.getFoo('bar').name" supposed to work?

2012-06-19 Thread Martin Gainty
correct...you *should* test your # OGNL expressions in code before re-factoring into JSP for example: Map params = new HashMap(); // populate params HashMap params.put("blah", "This is blah"); params.put("('\\u0023_memberAccess[\\'allowStaticMethodAccess\\']')(meh)", "t

Re: ParamsInterceptor: is input "bean.getFoo('bar').name" supposed to work?

2012-06-19 Thread anw
Thanks Maurizio. I understand this kind of expression is not recommended for security reasons, and this is probably a good thing if such expressions were not evalued by default. But it appears that such expression IS evalued, the setter is invoked with the correct value. That's why I think there i

Re: ParamsInterceptor: is input "bean.getFoo('bar').name" supposed to work?

2012-06-19 Thread Maurizio Cucchiara
My guess is that this kind of expression stop to work since 2.3.1.2 version (see http://goo.gl/RYL7a) Unfortunately //bean.getFoo('bar')// is, from OGNL prospective, an eval expression and using it as a parameter is not a good choice in terms of security. You could use this kind of expression by

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread Pierre TEMPLIER
Locale.FRENCH and Locale FRANCE should output something like 345 987,246 i can confirm that with a slightly modified struts-blank app (defaultStack and a textfield mapped to a Double) i'm having a conversion error for Doubles too. It doesn't like the thousand separator (space) and it converts coma

ParamsInterceptor: is input "bean.getFoo('bar').name" supposed to work?

2012-06-19 Thread anw
Hi, I have the following form submitted to a Struts2 action: Is this input name supposed to work with ParamsInterceptor? Actually Bar.setName() is successfully set with the correct value, but it also adds a conversion error (xwork.default.invalid.fieldvalue) for this field and action is returni

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread Pierre TEMPLIER
that's it, the parser expects localized input. I'd like to be able to handle parsing by myself for Doubles (without depending on the locale). I was able to register an application-wide DoubleConverter with primitive type double this way : == xwork-conversion.properties == # syntax: = double = co

Re: validation method is being executed twice in IE (jCaptcha img)

2012-06-19 Thread Maurizio Cucchiara
Hi Lucas, we need some more further details... What S2 stack did you define for you action? Why do you suspect that your action is executed twice? Could you post the java and jsp fragments? Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921

Re: validation method is being executed twice in IE (jCaptcha img)

2012-06-19 Thread Dave Newton
How is it fetching the image? That shouldn't cause a request to the action. Dave (pardon brevity and typos, on cell) On Jun 19, 2012 4:58 AM, "lucas owen" wrote: > Hi Struts 2 Users! > > I have this little problem here, only in Internet Explorer (it works in > Firefox and Chrome): > > the actio

validation method is being executed twice in IE (jCaptcha img)

2012-06-19 Thread lucas owen
Hi Struts 2 Users! I have this little problem here, only in Internet Explorer (it works in Firefox and Chrome): the action is being executed twice I think because in the JSP form I have a captcha with an image and when it fetches the image it creates a new request. Anybody knows how to solve it?

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread J. Garcia
According to the Java formatting api, the French locale for integers would look something like this: 345 987,246 http://docs.oracle.com/javase/tutorial/i18n/format/numberFormat.html As I have been working on integer l10n, I have tested this, and if I set French locale and enter an integer like t