I have a xhtml page in which there can be 0 to 6 check boxes independent of each other. I want to make sure when all of them are checked, submit button is enabled. Let say there are 3 checkboxes, only when these 3 checkboxes are clicked, the submit button must be enabled. Looking for a solution in JSF / Javascript.
Share
Below is the code what I came up with, JSF/Seam dont really have a clean solution for implementing checkboxes, in fact JSF itself is shit like a diamond in the sky. Groovy is much lighter and clean. Took me an HOUR to figure out , with JQuery this should have been faster and easy peasy, but that would my future refactoring effort. Thanks to Andrey and Mugur. Time to focus on integrating this shit with CXF Web Services. I have tried to clean as much as possible and post the solution, if there are any mistakes my apologies, any java kid should be able to figure out mistakes.
Andrey : Your solution was fine for any regular application, its just that when JSF components are rendered as HTML, the component tree generates lot of input checkboxes, for 6 input checkboxes the component tree generated 170, thanks to JSF. No wonder why Sun sold out.
ActionBean.java