I need to move from one JSF page to another (to create a new entity) and,
when finished, go back to the source page (consumer of entity) by transferring the newly created entity?.
Is there a standard way to move from one page to another by passing parameters?
JSF is a Model/View/Controller architecture, and rather than transferring parameters old-school style, one would normally simple transfer values from one mode to another. You can do this in one of 2 ways:
1. Inject one model into another and use POJO set/get methods to do the transfer (normally this is done in the action processor that handles the original form submit).
2. Inject a common object into both the source and destination objects and use it as an intermediary.
Normal scope rules apply - you can't inject a request-scope object into a session-scope object, but other than that, it's quite simple and it has both less network overhead and greater security than pumping values out to the client and back in again.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Whoever got anywhere by being normal? Just ask this exceptional tiny ad: