Announcement Announcement Module
Collapse
No announcement yet.
Moving from one controller to another, seamlessly? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Moving from one controller to another, seamlessly?

    Let's say I have a new member wizard, which touches multiple controllers. In this example, it could be for a social network like Flickr:

    1) Create the user (NewUserController with User command obj)
    2) Invite any friends (NewInviteController with Invite command obj)
    3) Upload picture (NewUploadController with Upload command obj)

    Now I want to be able to move through these controllers in one multi-step wizard, so we have good code reuse.

    Any ideas on best practices to do this?

    Maybe store where you are and where you want to go in the users' session, and read them and redirect?

    Let me know what you think.

    Andrew

  • #2
    Have you had a look at the WizardFormController?

    Also, in the sandbox (and in a dev-snapshot very soon) we will have a separate project available, called webflow.

    have a look at the Spring wiki and jroller.com/page/kdonald (Keith's blog). You can find more info there on WebFlow

    Comment


    • #3
      Originally posted by Alef Arendsen
      Have you had a look at the WizardFormController?

      Also, in the sandbox (and in a dev-snapshot very soon) we will have a separate project available, called webflow.

      have a look at the Spring wiki and jroller.com/page/kdonald (Keith's blog). You can find more info there on WebFlow
      Can I use multiple controllers and multiple command objects for WizardFormController?

      Comment


      • #4
        You have a couple of options here:

        1) wrap all the command objects in one and provide bean setters here. You can then reuse the command object in all your controllers (or use the wizardformcontroller and implement all the behavior there)
        2) use WebFlow which provides sophisticated flow support
        3) use a redirect view to redirect to the next form controller and store the object in the session yourself (you'd have the store the command objects in the session yourself)

        Alef Arendsen

        Comment

        Working...
        X