One of the troubles I come across when working with JSF applications is the inability to verify that a user should even be on the page that is requested. I am wondering if Seam helps out in this area in any way.
Let me give an example scenario.
In the hotel booking application, a request for /hotel.seam or /book.seam without a conversation id renders a partially broken page (empty hotel data). Some of the logic in the backing bean could assume that a valid hotel is available, but in this case it is not. While the booking application doesn't trip on this, it is very likely that another application could (depending on what is going on in those backing bean getter methods). From the standpoint of a user, I would expect the application to redirect me to a start page if I attempt to access the application somewhere in the middle of a flow.
Is there any place I can perform validation logic before PhaseId.RENDER_VIEW? If the conversation is not valid or a certain variable is not present, I would like to redirect the user somewhere else.
ah, answered my own question (or more accurately, the Seam developers already answered it). Page actions are the feature for which I am searching and they are covered in section 4.1.1. of the Seam manual.
My followup question is, why not implement this in the Hotel Booking app to prevent access to the two pages mentioned if the hotel is not set?