This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
My code is :
1. Use the "Code" button to wrap tags around your sample code and XML to make them easier to read.
2. Remove everything that doesn't actually have to do with what you are trying to get working from your samples. Otherwise the forest obscures the trees, so to speak.
From what I was able to read, I can see possible trouble in one case, for certain. The "onclick" code for a h:commandButton or its AJAX-enabled a4j:commandButton equivalent MUST return either true or false. If it returns TRUE, the form (or selected parts of the form for a4j version) will be submitted to the server. If it returns FALSE, the submit is suppressed.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Oct 26, 2010
I've probably got the RichFaces version of getElementById mangled since I'm using what passes for my memory.
I do NOT recommend what you did to set up the selectItems. You would be better off changing it to a value reference instead of a function call. What I normally do when I need a list of selectItems built for me is have the property "get" method check for a cached copy of the list and call the list constructor if there wasn't one. This is handly because I can refresh the list by simply invalidating the cached list.