This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
How to force a value in a component from the backing bean
posted 5 years ago
I have three SelectOneMenu components, A B and C. At first only A is rendered, after option choice B comes up, and after B's choice, C comes up.
I have a value change listener in my A component, which if the value of A is changed, it should trigger the C component to hide, and set it's value to an empty string. When I change the value of A everything goes well on the first set, but then the second set, when the page is refreshing, the backing bean receives the value that was in the component (so the backing bean had the correct value but not the front end, which causes on the second set, the value to be wrong on the bean). How do I force a value into the component on the ValueChangeListener, when the Value ChangeListener on the A component is triggered?