Hi. I have a simple problem: I need to divide by 100 user's input in some fields when I'm going to store values in DB and perform the opposite operation when loading the form again.

I thought Struts 2 type conversion was what I needed, so I created a simple PercentageConverter, implementing convertFromString and convertToString to divide by 100 and multiply by 100, respectively. The first operation is performed fine, the problem is that convertToString is never being called. I think it has to do with the fact that the fields are strings themselves, so Struts thinks a conversion is not needed.

What can I do to solve this problem? I'm looking for the simplest solution possible.

Thanks in advance.****
****

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

Reply via email to