Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Navigate between two page tranfering parameters  RSS feed

 
D. Formenton
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

A pratical example would be appreciated.

Thank you.

Domenico
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes there is. Don't transfer 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!