my dog learned polymorphism
The moose likes JSF and the fly likes Help with ValueChangeListener!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Help with ValueChangeListener!!!" Watch "Help with ValueChangeListener!!!" New topic

Help with ValueChangeListener!!!

Amol Chavan

Joined: Sep 04, 2005
Posts: 28
Hi All Ranchers,

I am stuck with JSF's ValueChangeListener......Can anyone help me out of it?
I have a combo box (h:selectOneMenu) for which I used valuechangelistener to get to know whenever user changes the value and selects new option.
Here is the code:

Now my method specified in valuechangelistener has following implementation:

Also whatever value I am setting for ,I am deciding which URL to be called and then passing this URL value to Javascript using hidden parameter which will take this URL and open a new window.

The problem is when I change the option and click submit button then it valuechangelistener works and on the console it shows the new option selected but I also have onclick event on submit which opens the new window for which URL comes from the bean.
But the roblem is it takes the old value from combo box even though it shows it has changed.What could be the reason?

Does it has to do something with Phases of JSF?

But I have written in the code that for 'ANY_PHASE' it will update the value.
But it still gives me the same problem.

Please help me!!!

Thanks in advance

[ August 21, 2007: Message edited by: Amol Chavan ]
[ August 21, 2007: Message edited by: Amol Chavan ]

Thanks n Regards,<br />Amol
Ronald Aguilar

Joined: Sep 14, 2004
Posts: 21
did you ever update this formaccessorbean.formURL value?

I agree. Here's the link:
subject: Help with ValueChangeListener!!!
It's not a secret anymore!