• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

SelectOneMenu Validation

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i need to validate the selectoneMenu in JSF. I'm using

using properties for error msg:

i get UIInput.REQUIRED's error: Please enter a value for this field on selecting option Select with value null.. I want to get special error for UISelect like...

or need to fire it thorugh Invalid

How it can be done? Or if any tother alternative available.
Ranch Hand
Posts: 121
Mac Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1) if you are allowed to use tomhawk library then correct your code as follows

if you want you can pull the summary message from property file and change as you like

2) write a custom validator and divert the flow to your custom validator and write the logic in java class.

3) you can write a listener and write the appropriate logic before validation phase.

Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic