Announcement Announcement Module
No announcement yet.
Need help with complex/dynamic flow Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with complex/dynamic flow

    Hey everyone,

    I'm new to Spring Web Flow 2 (but not new to Spring or Spring MVC) and am trying to transition a portlet (JA-SIG uPortal's MailPortlet) to use Spring Web Flow 2 and am having some trouble figuring out a flow config that will fit the requirements.

    I've read through the Portlet Integration section of the Spring Web Flow Reference Guide and with help from Eric Dalquist (uPortal developer) and that guide, I think I have the portlet.xml and web.xml stuff figured out, so I started on the flow.

    I'm mostly just looking for just a few pointers anyone could provide, since what I'm trying to do seems more complex than what info provided about how to author a flow as described in the web flow reference guide.

    Sorry in advance that this post is so long.

    That said, here is what I'm aiming for:

    Tabbed Mail Accounts and Mail List View

    * When the portlet is first loaded, it should go into a view state comprised of a list of the user's active mail accounts, each represented as a series of tabs across the top of the portlet (these are to be loaded by a service in the portlet). The initial tab that is selected is either the first index, or the last tab the user chose (from user's preferences stored in DB, so would persist even if session is terminated).
    * In the body of the portlet under the tabs is the list of the top N emails from the selected tab's mail account. During view, these are only loaded (the mailService is only called) for the active tab.
    * User can click on tab to select a different mail account which should call mailService to get mail for that account.
    * It is probably not a good idea for all mail to be gathered at once, so the mailService should only be called for the selected Mail Account's tab that is displayed.
    * There is a link both in the error description and in the tabs at the top to allow user to manage their mail accounts (which correspond to the displayed tabs).

    The main question I have about defining the flow for the Tabbed Mail Accounts and Mail List View is how to indicate in the flow that the states are (or an attribute of a state is) dynamic, because the number of tabs is determined by the mail accounts returned from the mailService, and only the mail for the particular mailService should be returned when that mail account's tab is selected.

    Edit Mail Accounts View

    * A bit like a simple CRUD area to manage accounts, but the templates stuff makes it more complex. Please read on...
    * Composed of a list of the user's current accounts (with actions) and a form at the bottom for adding/editing an account
    * User can click on a current account, which should populate the form so that they can edit and update it
    * User can add an account, in which case (like Thunderbird, etc.) they can select a "template" account (for Gmail, .Mac, MobileMe, AOL) where those template accounts' info is defined in spring config for the portlet.

    The main question I have about the Edit Mail Accounts View is how to indicate via the flow that the account form can have data loaded from a template account for account addition if that account template is chosen (and the account templates are loaded from the spring config so aren't static really), but also have the form bind to one of the existing user's mail accounts when an existing mail account is chosen. I'm open to not having all of this as the same view/area, but I'm curious as to whether what I'm aiming for here is possible and how you might suggest it be done.

    Thanks in advance, and I can provide the flow xml that I have so far if you'd like.
    Last edited by garysweaver; Dec 4th, 2008, 12:02 PM.