Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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.
 
Let nothing stop you! Not even this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic