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.
We are new to JSF and were wondering how we can use a listbox and retain the change in value. The page only seems to retain the default value and we can't get it to change the value of the listbox. It doesn't seem to be calling this listener and the onChange doesn't seem to actually be working. The code we're using is below. Anyone see where we're in error?
First of all onChange has to be onchange. To capture your listbox selection, you need to provide the value attribute that maps to a backing bean's property of type String(since your itemValues are all String). On a different note, you do not need valueChangeListener or onchange-submit unless your other components on the same page should be repopulated based on your listbox selection.