Announcement Announcement Module
Collapse
No announcement yet.
Confusion on Spring webflow reference manual. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Confusion on Spring webflow reference manual.

    Dear all;

    <flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow
    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

    <input name="hotelId" />

    <on-start>
    <evaluate expression="bookingService.createBooking(hotelId, currentUser.name)"
    result="flowScope.booking" />
    </on-start>

    <view-state id="enterBookingDetails">
    <transition on="submit" to="reviewBooking" />
    </view-state>

    <view-state id="reviewBooking">
    <transition on="addGuest" to="addGuest" />
    <transition on="confirm" to="bookingConfirmed" />
    <transition on="revise" to="enterBookingDetails" />
    <transition on="cancel" to="bookingCancelled" />
    </view-state>

    <subflow-state id="addGuest" subflow="createGuest">
    <transition on="guestCreated" to="reviewBooking">
    <evaluate expression="booking.guests.add(currentEvent.attrib utes.guest)" />
    </transition>
    <transition on="creationCancelled" to="reviewBooking" />
    </subflow-state>

    <end-state id="bookingConfirmed" >
    <output name="bookingId" value="booking.id" />
    </end-state>

    <end-state id="bookingCancelled" />

    </flow>

    In this example:
    1. At the top: <input name="hotelId" />, From where the hotelId comes from? where it ref from? Does it pass from anywhere?

    2. <evaluate expression="booking.guests.add(currentEvent.attrib utes.guest)" />
    In this expression; booking.guests (Is booking means interface?? and guest means method of that interface??)

    Further more in this example. "currentEvent.attributes.guest"..I guess last "guest" must be the output name from parent flow i.e "reviewBooking". then how and where it comes from??
    Last edited by japs; Jul 10th, 2011, 01:50 AM.
Working...
X