Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1309

Creating ActivityManager "on-demand" is impractical

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 1.1.0.M3
    • Fix Version/s: None
    • Component/s: GWT
    • Labels:
      None

      Description

      In complex applications, you'll quite often (I guess) have a need for nested ActivityManagers: an Activity starts an ActivityManager to handle child activities in nested "display" regions.
      While it's easy to create an ActivityManager and have it react to later place change/change-request events, it's impractical to initialize it with the child-activity corresponding to the current place: because the ActivityManager is created in response to a PlaceChangeEvent, it won't receive the event itself. The only solution seems to be to fake a PlaceChangeEvent, taking advantage of ActivityManager directly implementing PlaceChangeEvent.Handler and directly calling its onPlaceChange method:

      ActivityManager subActivities = new ActivityManager(mapper, eventBus);
      subActivities.setDisplay(subactivitiesDisplay);
      subActivities.onPlaceChange(new PlaceChangeEvent(placeController.getWhere());

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 4h 54m 1 Ray Ryan 30/Aug/10 12:40 PM
        Resolved Resolved Closed Closed
        54d 4h 53m 1 Ben Alex 23/Oct/10 5:33 PM

          People

          • Assignee:
            cramsdale Chris Ramsdale
            Reporter:
            t.broyer Thomas Broyer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: