So I've read some about JSF and I've come to think about the creation of web application where website describes the XHTML document. These documents are connected to special java program, "beans", which can provide enhanced functionality on the server side such as database or complex calculations.
If a method in a bean is called from an XHTML document linked to a command button component (this typically happens when the user clicks a button) and returns a string X, it means that the next site will be called and opened(X.xhtml.)
In this way the web application can toggle between different sites. Now I've been wondering is this appropriate? And what are the advantages and disadvantages this entails way to switch sides?