• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Converter + Validation - scaling mismatch

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"
value="#{safemsg.displayMinTimeO}">
<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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic