任何身体都可以帮助我理解模型 - 胶水事件处理程序的流程......它如此令人困惑或简化下面的代码......
<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>
答案 0 :(得分:1)
当您调用事件“Shipment.List”时,它将广播ShipmentController的"needShipmentList"
函数,执行后它将从主页的“Primary”布局返回List.Shipment.cfm
。
needShipmentDetail
函数触发了一个链接whicj "Shipment.Display"-->needShipmentDetail
Display.Shipment.cfm
)上,有一些链接可供删除,列出......等等。"xe"
是eXit Events的惯例