以表体编辑事件为例
首先创建表体编辑事件的处理类
package nc.ui.arap.invoice_req.ace.handler;
import nc.ui.pubapp.uif2app.event.IAppEventHandler;
import nc.ui.pubapp.uif2app.event.card.CardBodyAfterEditEvent;
import nc.ui.pubapp.uif2app.view.ShowUpableBillForm;
/**
* 发票申请表体编辑后事件 </p>
* 创建时间: 2020年8月16日 下午3:12:33
* @author xuzihui
*
*/
public class AceBodyAfterEditHandler implements IAppEventHandler<CardBodyAfterEditEvent> {
private ShowUpableBillForm billform;
/**
* @return billform
*/
public ShowUpableBillForm getBillform() {
return billform;
}
/**
* @param billform 要设置的 billform
*/
public void setBillform(ShowUpableBillForm billform) {
this.billform = billform;
}
@Override
public void handleAppEvent(CardBodyAfterEditEvent arg0) {
// TODO 自动生成的方法存根
}
}
然后要把刚才创建的编辑事件处理类注册到XML文件
<!-- 事件监听newadd -->
<bean id="bmModelEventMediator" class="nc.ui.pubapp.uif2app.model.AppEventHandlerMediator">
<property name="model" ref="bmModel" />
<property name="handlerGroup">
<list>
<!-- nc.ui.pubapp.uif2app.event.OrgChangedEvent -->
<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
<property name="event" value="nc.ui.pubapp.uif2app.event.OrgChangedEvent" />
<property name="handler">
<bean class="nc.ui.arap.invoice_req.ace.handler.AceOrgChangeHandler" >
<property name="billForm" ref="billForm" />
</bean>
</property>
</bean>
<!-- nc.ui.pubapp.uif2app.event.billform.AddEvent -->
<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
<property name="event" value="nc.ui.pubapp.uif2app.event.billform.AddEvent" />
<property name="handler">
<bean class="nc.ui.arap.invoice_req.ace.handler.AceAddHandler" />
</property>
</bean>
<!-- 表体编辑前事件 -->
<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
<property name="event" value="nc.ui.pubapp.uif2app.event.card.CardBodyBeforeEditEvent" />
<property name="handler">
<bean class="nc.ui.arap.invoice_req.ace.handler.AceBodyBeforeEditHandler">
<property name="billform" ref="billForm"></property>
</bean>
</property>
</bean>
<!-- 表体编辑后事件 -->
<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
<property name="event" value="nc.ui.pubapp.uif2app.event.card.CardBodyAfterEditEvent" />
<property name="handler">
<bean class="nc.ui.arap.invoice_req.ace.handler.AceBodyAfterEditHandler">
<property name="billform" ref="billForm"></property>
</bean>
</property>
</bean>
</list>
</property>
</bean>