1

I'm developing an application and I have a page that is divided in three pieces.

for example:

  1. Select Files(s)
  2. Modify Files(s)
  3. View Results.

Requirements:

  • User can go back at page 1 from page 2 (this is not a big deal, redirect works too)
  • User can go back at page 2 from page 3 (at this point i need all the data of page 2)
  • User can go from page 3 to page 1 with no data. (Something like New file modification)

Currently I'm using one single .xhtml page (panel visibility change) and one @ViewScoped bean but as I add more functions in that page this is getting bigger and hard to maintain/modify. Also, i don't think that this is the best way to do it.

I start reading about @FlowScoped and @ConversationScoped but id like to hear some advices/opinions.

Thank you!

Nick_ang
  • 11
  • 1
  • 5
  • 2
    [How to choose the right bean scope?](http://stackoverflow.com/q/7031885/1391249) – Tiny Sep 03 '16 at 09:02

1 Answers1

0

Recently, I have been in a similar situation as you. One of the lessons I took from writing a wizard-style application is that next time I would put more emphasis on immutability and immutable data structures (e.g. those that Clojure offers) so that reverting to a previous state is easy as the application grows.

Now, depending on the size of your files that is probably not feasible and might be overkill. However, remember that going back one step in a wizard needs to revert modifications being made (for example to the modifications to the files).

Markus Barthlen
  • 389
  • 4
  • 15