0

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>
Jeromy French
  • 11,812
  • 19
  • 76
  • 129
St.
  • 143
  • 1
  • 6
  • 1
    I don't know MG, but that snippet looks relatively straightforward. Have you read [the documentation](https://github.com/modelglue/modelglue-framework/wiki)? What _specifically_ are you confused about? – Peter Boughton Mar 06 '13 at 18:11

1 Answers1

1

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