One approach is to add a message to The Flash in the action method that adds the customer.
You don't need to explicitly check that the user was coming from add_customer.jsf
, if it's that page (or actually the code behind it) that sets the message. On the destination page you only need to have an <h:messages>
component.
A co-worker of my posted an example CRUD app that does exactly this at: Sample CRUD application with JSF.
The relevant code is in the backing bean UserEdit and the page where the redirect happens to.
Note that if your JSF implementation is Mojarra, The Flash only works between pages in the same directory. If this bothers you, please consider voting for this issue: http://java.net/jira/browse/JAVASERVERFACES-2136