I have been using
JSF for about 2 months now and I am still struggling.
I know that the JSF page is coupled to the backing bean which is bound to some managed bean. The managed bean can be in any of the three scopes (request, session, application). When I invoke a faces page, the page may have existing data based on the managed beans state. (ie. if session then the values will show on the page). Here are my problems:
1. If I want my manged bean to be in request scope (I am trying not to use session scope unless absolutely necessary) and populate the screen with data on the first invocation, how can I achive this? Using just
servlets and
JSP's, parameters are passed in the url and then the servlet would take the parameter out of the request object.
2. Simmilar to number 1, I constantly find I am passing parameters to do my work going from page to page. For example. A user wants to add information to the site, but must have a current subscription. If the user is not current a new page is displayed to update their subscription and then allowed to proceed with their original task.
3. How do I get data to my action that is not part of a managed bean with out using session. For example, a message id that is needed to process the action, but isn't part of the jsp page that posted the request. Are url parameters the only way to go? Or do I need to define an attribute on my view bean that contains the data. But how do I set it. This is almost a combination of #1 and #2.
It just seems to me that JSF is more OO based, but I am constantly thinking in terms of proceedural/transcationally.
Thanks in Advance.
Cheers
-Jeff
[ October 16, 2006: Message edited by: Jeff Calusinski ]
[ October 16, 2006: Message edited by: Jeff Calusinski ]