posted 16 years ago
Offhand, I'd say you're trying to do things inside out and it's making things excessively complex.
JSF is based on Inversion of Control. In IoC, you normally don't have your beans go out and get things or do things. Instead, they wait for things to be injected into them and for requests to be made of them.
Another way of stating it is that the controlling logic is provided by the framework - the bean only provides the action logic and data storage.
<hr/>
You should separate business logic from the backing bean. It's good practice. But the way this is normally done is to implement the logic bean as a separate POJO which is injected into the backing bean either by JSF or an equivalent framework such as Spring. The backing bean's action processors then invoke the business bean's methods as needed,
I have no idea what "selected rows" means. JSF is not a client/server architecture nor is any other web application regardless of platform or programming language. A JSF backing bean can only receive events in a batch as an HTTP GET or POST request dispatches them - there's no back-and-forth like in client/server (and this is why I always stress that JSF is not a true MVC architecture). More to the point, I don't know what you mean by saying a row is "selected". There is a "current row" as a bean receives updates from the client, but this is enumerated by the framework, but that's an enumeration of all rows. There's no selection involved, just fields that updated or not.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.