Results 1 to 2 of 2

Thread: Multiple actions

  1. #1
    Join Date
    May 2005
    Posts
    1

    Default Multiple actions

    One very common aspect of a webflow is to define one or more actions, which retrieve datasets, in combination with a view state, which displays the data. If i have to invoke more than one action I have two options:
    1. I can define define more than one action states and stick the action states together. (this can get very confusing, since every action state has to have a unique name)
    2. as far as I see CompositeAction is used to model entry and exit actions, which can contain more than one action. (and I have to add another action to define a valid state)

    Are there any plans to allow multple actions inside am action state without the workaround of entry/exit actions? (or one action, which acts as a container for other actions, like CompositeAction)

    BTW: Another interesting feature would be to have these actions executed in parallel, since in this case they are not related.

    Regards,
    Harald Dietrich

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    That's actually already possible. Look at the webflow DTD:

    <!ELEMENT action-state ( property*, entry?, action+, transition+, exit? )>
    As you can see, it says 'action+', so an action state contains one or more actions. So e.g. you could have the following:

    Code:
    <action-state id="...">
       <action bean="..." name="first"/>
       <action bean="..." name="second"/>
       <transition on="first.error" to="..."/>
       <transition on="second.success" to="..."/>
       <transition on="second.error" to="..."/>
    </action-state>
    Note how the above code fragment is using 'named actions' to ignore the "success" event of the "first" action (e.g. there is no transition for it). This is needed because otherwise that transition would be selected when the first action signals the success event, interrupting action execution.

    We're not planning on doing a parallel action, which executes it's nested actions in parallel (e.g. in seperate threads), but it would be a cool thing try.

    Erwin

Similar Threads

  1. Spring managed Struts Actions
    By drc in forum Web
    Replies: 2
    Last Post: Jul 14th, 2005, 10:46 AM
  2. Auto-injecting Struts Actions
    By steve_molitor in forum Web
    Replies: 0
    Last Post: Apr 21st, 2005, 04:03 PM
  3. Replies: 1
    Last Post: Feb 25th, 2005, 07:12 AM
  4. Multiple Pages
    By afida in forum Swing
    Replies: 12
    Last Post: Feb 16th, 2005, 08:42 AM
  5. Replies: 10
    Last Post: Nov 2nd, 2004, 09:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •