Welcome to the JavaRanch, Koti!
We have a "Code" button on our message editor that helps make structured code (
java, XML) easier to read. I've done some editing on your post to use it.
Actually, instead of monster blocks of code, it's easier for us if you mention exactly what you're trying to do. Ideally in "business terms", not in terms of specific logic, since often when you pre-select a technical solution it obscures the actual requirement and we may know a much easier solution.
I can say this much, however, without spending a lot of time poring over the code:
1. JSPs are no longer supported in
JSF. That was dropped when JSF version 2 came out. You now use View Definition files (.xhtml). Incidentally, JSTL and JSF don't mix well.
2. Your "get" method is going to be horribly expensive. A "get" can be called up to about 6 times per page request, which means 6 database fetches. The get and set methods should avoid doing heavy-duty work or anything that alters bean state (side-effects).
3. Probably what you really need is some AJAX, but I see too many trees and not the forest, so I'm not sure.