Announcement Announcement Module
Collapse
No announcement yet.
How to specify render frag for unsuccessful state transition Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to specify render frag for unsuccessful state transition

    Hello,
    I'm using SWF 2.3 with partial page rendering using the <render> element in my flow defintion as follows:

    Code:
    <view-state id="viewA">
        <transition on="save" to="viewB" model="order">
            <evaluate expression="myPojo.save(order)"></evaluate>
            <render fragments="sectionA, sectionB"></render>
        </transition>
    </view-state>
    	
    <view-state id="viewB" model="order">
       <transition on="save" to="viewC">
          <render fragments="sectionB, sectionC"></render>
       </transition>
    </view-state>
    This works fine for the case where the .save operation is successful but when the save operation returns false, the default behavior of SWF is to rerender the same view but I don't see a way to specify which fragments should be rendered when the view is rerendered. I've tried to use the <on-render> element but then that overwrites the <render> fragments specified on other view-states transitioning into that view. For example, if I add
    Code:
    <on-render>
       <render fragment="sectionB" />
    </on-render>
    to the view state "viewB" above, the render fragments specified in the "viewA" transition to "viewB" get overwritten (It appears that the render fragment follows a "last one wins" approach to multiple occurrences). Using a seperate <decistion-state> element, I can specify the correct fragments to render for both the success and failure path but was looking for a way to not have to introduce the additional State. Can anyone shed some light on the way the <render> element works? I wasn't able to find much documentation on this in the reference docs. Thanks a bunch in advance!

  • #2
    To put this more simply, is it possible to specify the fragment to render when a transition in unsuccessful.

    Comment


    • #3
      Ability to specify mulitple &lt;render&gt; elements for an event/transition

      Can anyone confirm or deny that the <render> element can only be specified in one location for a given event/transition? If so, this would be a useful feature to provide in SWF 3 (if it's not already in the works).

      Comment

      Working...
      X