posted 11 years ago
I almost never use ui:repeat. Nine times out of ten, an h:dataTable will do what I want, and overall, it's a more straightforward approach. For example, in the case in point, I'd make the entire ui snippet be a single form, setup a suitable DataModel to wrap "NewsAction.newsList" - which by the way is bad form. Don't capitalize the first letter in "NewsAction", since it's an instance ID, not a class name. In the model, I'd provide a column object that backed the checkbox with a boolean property.
When it was all done, I'd have something that looked 100% identical to what you laid out, but required fewer tags, less EL, and simpler backing-bean logic.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.