• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action vs ActionListener in JSF/IceFaces

 
satya mamillapalli
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic