• Post Reply Bookmark Topic Watch Topic
  • New Topic

Converter + Validation - scaling mismatch

Dowell Griffin
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am somewhat of a newbie to JSF.

If I have a converter that scales by 100ths (entry in seconds, stores in 100ths of seconds) I have to use the x100 value in the ranges for the converter. So, when an invalid entry occurs the default message shows the scaled ranges which is wrong.

<h:inputText converter="IntToFloat100thsConverter"
<f:validateLongRange minimum="100" maximum="25500"/>

The user enters 1 - 255 but the validation message says 100 - 25500. I know I can use validatorMessage="1 - 255" but this seems so common I am wondering if there is a better solution I am overlooking. Comments?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!