This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSF and the fly likes ValueChangeEvent help!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ValueChangeEvent help!!" Watch "ValueChangeEvent help!!" New topic

ValueChangeEvent help!!

Kumar Gaurav
Ranch Hand

Joined: Apr 08, 2008
Posts: 108
There is a dropDown for which there is a valueCahngeListener. On exceuting code

valueChangeEvent.getOldValue().. its always giving null, But valueChangeEvent.getNewValue() is giving the current value that is selected in drop down.
Any cue why it is coming so.

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
The getOldValue() gives the originating value as it was during initial display/render of the page.
The getNewValue() gives the newly selected value as the client has chosen.

What did you expect then?
I agree. Here's the link:
subject: ValueChangeEvent help!!
It's not a secret anymore!