posted 9 years ago
"some requirements" is often a euphemism for "manager is an idiot". My recommendation on how to solve such problems involves updating one's CV if said manager(s) cannot be persuaded to discard such arbitrary limitations. Deliberately avoiding industry standard solutions because some "expert" arbitrarily forbade them just means that whatever workaround is done is typically going to be time-consuming, expensive, often fragile, and more difficult/expensive to maintain.
JSF expects to do all the fetching and updating between Model and View itself. JSF is a fairly pure implementation of the MVC paradigm, but in JSF, you don't write Controllers to do the transfer of data between Model and View, they are pre-written parts of the JSF FacesServlet and tag implementations. And the h:dataTable tag implementation in particular for such cases as the one you describe.
Unfortunately, the current implementation of dataTable doesn't take nesting into account, so some helper code has to be written that makes up for that lack.
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.