File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Action vs ActionListener in JSF/IceFaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Action vs ActionListener in JSF/IceFaces" Watch "Action vs ActionListener in JSF/IceFaces" New topic
Author

Action vs ActionListener in JSF/IceFaces

satya mamillapalli
Ranch Hand

Joined: Jun 22, 2005
Posts: 63
I am using JSF 1.2 ICEFACES 1.8 for a web app..

I have a created a backing bean with request scope..

When I use Action method in the bean, the bean object dies and creates again from scratch..I have the screen input parms available in the action method only..

WHen I display the JSF lifecycle, It starts the PHASE RESTORE_VIEW again. Please advise if this is normal..

Also How do I handle session timeout to force the user to log in again..

START PHASE RESTORE_VIEW 1
END PHASE RESTORE_VIEW 1
START PHASE APPLY_REQUEST_VALUES 2
END PHASE APPLY_REQUEST_VALUES 2
START PHASE PROCESS_VALIDATIONS 3
END PHASE PROCESS_VALIDATIONS 3
START PHASE UPDATE_MODEL_VALUES 4
END PHASE UPDATE_MODEL_VALUES 4
START PHASE INVOKE_APPLICATION 5
END PHASE INVOKE_APPLICATION 5
START PHASE RESTORE_VIEW 1
END PHASE RESTORE_VIEW 1

START PHASE RENDER_RESPONSE 6
END PHASE RENDER_RESPONSE 6


Thanks
Satya
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

JSF and request scope beans don't get along very well. JSF uses postbacks, and since request scope objects by definition (JSF or not) are created and destroyed on a per-request basis, they can't carry over data from one request (postback) to the next.

This led to a lot of people getting annoyed because they were being forced to use session scope for relatively short-lived objects. So in JSF2, view scope was added. View scope is a special type of session scope where JSF automatically discards the backing bean when the user switches to a new view.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Action vs ActionListener in JSF/IceFaces
 
Similar Threads
Capturing initial view instance in restore view phase
Issue using h:commandLink with rendered attribute
Jumping past phases 2, 3, 4, and 5?
Issues with facelets and saveState?
Render Response phase is not getting invoked