File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Dealing with backing bean on request scope ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Dealing with backing bean on request scope ?" Watch "Dealing with backing bean on request scope ?" New topic

Dealing with backing bean on request scope ?

Hatem Alimam
Ranch Hand

Joined: Dec 14, 2008
Posts: 30
Hi everybody
I just have little issue, I have a JSF page with its backing bean on request scope.
the page has a form which is filled up dynamically from an attribut on request scope also, now once the page is displayed the page is completely dead with its contents, I mean that if I modified the form and want to submit I get nothing but NullPointer, because it all disappeared with the request end. And I just want the form to submit its input texts' values normally.
I can't assign this page on the session scope, which would solve the lines up, but in my program this page could be requested more than once during the user session, and that will make the form values change to one value at any refresh.
I hope you got what am in.
thanks in advance...

SCJP 5.0, SCWCD 1.4, SCBCD 3.0 with 100 score
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Just preserve it for the next request, exactly as you did for the first request. If this is based on certain request parameters, then use h:inputHidden or t:saveState to pass them to the subsequent request.
I agree. Here's the link:
subject: Dealing with backing bean on request scope ?
It's not a secret anymore!