struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Garcia" <jogaco...@gmail.com>
Subject Re: conversion error repopulation not working
Date Fri, 25 May 2012 16:09:06 GMT
Thanks Lukasz for your reply.

While preparing a minimal example, I got the reason of it all.

The real situation is:
 - The input form has an int field
 - The value already available should be formatted and localized: 43,000 /
43.000
 - In order to achive l10n, the input field tag is like this:

    <s:textfield key="mybean.value" required="false"
value='%{getText("number.format",{mybean.value})}'/>

In such a situation, the TextProviderHelper.getText() method is run, which
obtains the value from the bean, rather than obtaining it from the wrong
user input which was not possible to convert into the bean.

It would be nice if there was a specific method which would check if the
value to obtain is from an input field with conversion error. In such a
case, it would obtain the value from the user input. If no error, the value
would be from the bean.

Does it make sense?

Cheers,
J.


On Thu, May 24, 2012 at 8:10 AM, Łukasz Lenart <lukasz.lenart@googlemail.com
> wrote:

> Could you add some code example ?
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message