• 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

Problem with valuechange listener

 
Ranch Hand
Posts: 42
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I am facing a problem while dealing with valuechange listener.

I have one JSF compenent and that is required field and the code is





I have listenerMethod in backing bean. first when user go to this page there is some value of country if user selects 1st option i.e. Please select Country the due to validation it is giving validation exception, and resetting the selection to the previous value.

But i want the newly selected value to be selected by default.


If i remove required="true" then the null value is getting saved.

Do i need to go for custom Validator or is there any other way to achieve this?

any help would be highly appreciated.

thanks
Mahendra
 
Mahendra Pratap
Ranch Hand
Posts: 42
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
kindly ask me if i have not provided sufficient information.

Thanks,
Mahendra
 
Mahendra Pratap
Ranch Hand
Posts: 42
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could anyone of you please provide some help..?


or lets say discussion?

thanks,
Mahendra
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
You need to call

in your listner method.
This will fetch the latest value for you.

Ketan.
 
reply
    Bookmark Topic Watch Topic
  • New Topic