If a user enters 5 or 5.00 how can i ensure that the format will be 5.00

I let a user enter 5 or 5.00. But if a user enters 5, i want the bean to change the field to 5.00. If a user enters 5.99, no changes need to be made. But if a user enters 5.9, the field should change to 5.90.

Does anyone have any idea on a simple way to do this.

Thanks in advance

Adam

[317 byte] By [adamrau] at [2007-9-26 1:54:11]
# 1
Maybe you cat try to turn the value you get to float ordouble type in the server side.
selina_c at 2007-6-29 3:06:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...