Hi,
I've only done little JSF so far, but based on my experience with other MVC web frameworks, I'd strongly consider a third option: another class (some people may call it 'controller class', 'action class', or even 'facade').
So this would end up as follows:
1. class EntryForm:
Stores request parameters that were submitted from entry.jsp
So in entry.jsp you have some input fields such as:
< h:inputText value="#{entryBean.text}" / > ...
2. class AddrView:
Stores data to be shown by the 'address' jsp (e.g. city, street...)
So in addrView.jsp you have some output fields such as:
< h
utputText value="#{addView.stree}" / > ...
3. class ProductView:
Stores data to be shown by the 'product view' jsp (e.g. list of products)
So in productView.jsp you have some output fields such as:
< h
utputText value="#{productView.price}" / > ...
4. class EntryController :
the only class that holds logic that talks with the database (directly or, preferrable, though another utility class).
This class would hold references to the other beans, and read/update them as required:
Use the following code to make sure entryController methods are called when buttons are clicked:
Now, the only remaining problem is how to make sure that your EntryController actually knows the beans entryForm, addrView, productView..
For this, JSF uses 'injection' technique, which means you need the following lines in your 'faces-config.xml', for 'EntryController' (this tells JSF to call EntryController.setEntryForm() with your 'Entry Form', and similarly for the other bean):
Good luck.