This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I have a number selectOneListbox items on the same JSP page.
They are logically connected in a tree type structure, selecting list A will fill list B, selecting list B will fill list C and so on. I also clear the lists as required.
Each list has a Listener handler valueChangeListener which performs a number of actions: - Gets the new value. - clears the current list. - Updates the lists based on the selection.
Works OK 50% of the time but then depending on sequence (and luck/timing?), some selections of list items (up the tree) cause the valueChangeListener events of other lists to be fired with null/unselected values. I have done some searching and I believe it's a timing issue but thats all I can determine. I am quite new JSF...
FacesContext fc = getFacesContext(); String newAString = (String)event.getNewValue();
// listB is a Map object... listB = getNewBList(newAString); listC.clear();
fc.renderResponse(); }
When I play around with the list selection screen I get (without explanation) null events or events that refer to lower lists (say listC) without even having selected them...it is kinda driving me el nutso...
Did you find a solution to your problem? I have the same problem (i.e. several value change listener methods) and would be grateful for your help? Julien.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Spurious valueChangeListener calls on same JSP page