I have a simple jsf/primefaces application:
- When the user logs in, he has to select which order he works on - this order object is set into a SessionScoped bean
- Later, when the user navigates to any other pages (e.g. handleOrder.xhtml), the sessionScoped bean is queried to get the current order
My problem is, how to handle those situations, when:
- the user logs in,
- but doesn't select an order object
- but instead manually enters the url: handleOrder.xhtml?
My question is the following: is there a way to define a "global" navigation rule in faces-config, which says something like "if there is no open order redirect to listDeals.xhtml"? Or is there a way to identify if a navigation takes place by using a GUI element or if by entering a URL manually?
Thanks, krisy