flow in model-glue event handler

272 Views Asked by At

Can any body help me to understand the flow of model-glue event handler......its so confusing or simplify bellow code......

  <event-handler name="Shipment.List" type="templatedPage">
        <broadcasts>
            <message name="needShipmentList" />
        </broadcasts>
        <views>
            <include name="Primary" template="List.Shipment.cfm">
                <value name="xe_Display" value="Shipment.Display" />
                <value name="xe_Form" value="Shipment.Form" />
            </include>
        </views>
    </event-handler>

    <event-handler name="Shipment.Display" type="templatedPage">
        <broadcasts>
            <message name="needShipmentDetail" />
        </broadcasts>
        <views>
            <include name="primary" template="Display.Shipment.cfm">
                <value name="xe_ShipmentList" value="Shipment.List" />
                <value name="xe_ItemForm" value="Item.Form" />
                <value name="xe_ShipmentDisplay" value="Shipment.Display" />
                <value name="xe_ItemRemove" value="doItem.Remove" />
            </include>
        </views>
    </event-handler>
1

There are 1 best solutions below

0
On BEST ANSWER

When you call for event "Shipment.List", it will broadcasts "needShipmentList" function of ShipmentController, after execution it will return on List.Shipment.cfm from on "Primary" layout of master page.

  • "List.Shipment.cfm" has a link whicj is triggered for needShipmentDetail function
  • "List.Shipment.cfm" fatches values from "Shipment.Display"-->needShipmentDetail
  • on display page(Display.Shipment.cfm), there are some links for remove, for listing...etc
  • "xe" is a convention for eXit Events