- 修改按鈕配置文件
<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- 環境變量 -->
<bean id="context" class="nc.vo.uif2.LoginContext"></bean>
<!-- 模型部分配置*********************************************************** -->
<!-- 應用服務類,負責進行模型操作的處理 -->
<bean id="bmModelModelService" class="nc.ui.proadmin.threemeetings.ace.serviceproxy.AceThreemeetingsMaintainProxy"/>
<!-- 對象轉換器工廠,由此獲取操作對象的特徵信息 -->
<bean id="BOAdapterFactory" class="nc.vo.bd.meta.GeneralBDObjectAdapterFactory">
<property name="mode" value="MD"/>
</bean>
<!-- 層次結構構造策略 -->
<!-- 模型元素 -->
<!--========= 模型元素:[PUBAPP平面模型(BillManageModel)實例對象] ==========-->
<bean id="bmModel" class="nc.ui.pubapp.uif2app.model.BillManageModel">
<property name="context"><ref bean="context"/></property>
<property name="businessObjectAdapterFactory"><ref bean="BOAdapterFactory"/></property>
</bean>
<!-- 數據模型管理器,主要負責各種方式的模型初始化 -->
<bean id="bmModelModelDataManager" class="nc.ui.pubapp.uif2app.query2.model.ModelDataManager">
<property name="model"><ref bean="bmModel"/></property>
<property name="service"><ref bean="bmModelModelService" /></property>
</bean>
<!-- Mediator,模型之間監聽關係部分 -->
<!-- 組織面板//newadd -->
<!-- 卡片界面的工具欄和返回按鈕 -->
<!-- 模板容器,負責對模板的統一裝載 -->
<bean id="templateContainer" class="nc.ui.pubapp.uif2app.view.TemplateContainer" init-method="load">
<property name="context" ref="context"/>
<property name="nodeKeies">
<list>
<value>bt</value>
</list>
</property>
</bean>
<!-- 界面元素 ***********************************************************-->
<!--====== 視圖元素:[查詢區域控件實例對象] ==============-->
<bean id="viewa" class="nc.ui.pubapp.uif2app.tangramlayout.UEQueryAreaShell" init-method="initUI">
<property name="queryAreaCreator" ref="defaultQueryAction" />
</bean>
<!--====== 視圖元素:[PUBAPP列表視圖控件(ShowUpableBillListView)實例對象] ==============-->
<bean id="billListView" class="nc.ui.pubapp.uif2app.view.ShowUpableBillListView" init-method="initUI">
<property name="model"><ref bean="bmModel" /></property>
<property name="nodekey" value="bt" />
<property name="multiSelectionEnable" value="false" />
<property name="templateContainer" ref="templateContainer"/>
</bean>
<!--====== 視圖元素:[卡片界面工具欄和返回按鈕控件實例對象] ==============-->
<bean id="viewb" class="nc.ui.pubapp.uif2app.tangramlayout.UECardLayoutToolbarPanel" >
<property name="model"><ref bean="bmModel" /></property>
<property name="titleAction">
<bean id="returnAction" class="nc.ui.pubapp.uif2app.actions.UEReturnAction">
<property name="goComponent" ref="billListView" />
<property name="saveAction" ref="saveScriptAction" />
<property name="model" ref="bmModel" />
</bean>
</property>
</bean>
<!--====== 視圖元素:[PUBAPP表單控件(ShowUpableBillForm)實例對象] ==============-->
<bean id="billForm" class="nc.ui.pubapp.uif2app.view.ShowUpableBillForm" init-method="initUI">
<property name="model"><ref bean="bmModel" /></property>
<property name="nodekey" value="bt" />
</bean>
<!-- 界面佈局總裝*********************************************************** -->
<bean id="container" class="nc.ui.uif2.TangramContainer" init-method="initUI">
<property name="tangramLayoutRoot">
<bean class="nc.ui.uif2.tangramlayout.node.TBNode">
<property name="tabs">
<list>
<bean class="nc.ui.uif2.tangramlayout.node.HSNode">
<property name="left">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="viewa" />
</property>
</bean>
</property>
<property name="right">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="billListView" />
</property>
</bean>
</property>
<property name="dividerLocation" value="215.0f" />
<property name="name" value="列表" />
</bean>
<bean class="nc.ui.uif2.tangramlayout.node.VSNode">
<property name="up">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="viewb" />
</property>
</bean>
</property>
<property name="down">
<bean class="nc.ui.uif2.tangramlayout.node.CNode">
<property name="component">
<ref bean="billForm" />
</property>
</bean>
</property>
<property name="dividerLocation" value="43.0f" />
<property name="name" value="卡片" />
</bean>
</list>
</property>
<property name="name" value="cardLayout" />
<property name="showMode" value="CardLayout" />
</bean>
</property>
<property name="model">
<ref bean="bmModel" />
</property>
<!--
<property name="model">
<ref bean="$vmObject.topActionDependModel"/>
</property>
-->
</bean>
<!-- Actions -->
<bean id="toftpanelActionContributors" class="nc.ui.uif2.actions.ActionContributors">
<property name="contributors">
<list>
<ref bean="actionsOfList" />
<ref bean="actionsOfCard" />
</list>
</property>
</bean>
<!-- 列表顯示下的按鈕 -->
<bean id="actionsOfList" class="nc.ui.uif2.actions.StandAloneToftPanelActionContainer">
<constructor-arg ref="billListView" />
<property name="model" ref="bmModel" />
<property name="actions">
<list>
<ref bean="addAction" />
<ref bean="editAction" />
<ref bean="deleteScriptAction" />
<ref bean="defaultQueryAction" />
<ref bean="copyAction" />
<ref bean="separatorAction" />
<ref bean="defaultRefreshAction" />
<ref bean="separatorAction" />
<ref bean="commitScriptAction" />
<ref bean="unCommitScriptAction" />
<ref bean="approveScriptAction" />
<ref bean="uNApproveScriptAction" />
<ref bean="separatorAction" />
<ref bean="linkQueryAction" />
<ref bean="separatorAction" />
<ref bean="metaDataBasedPrintAction" />
<ref bean="metaDataBasedPrintActiona" />
<ref bean="outputAction" />
<ref bean="separatorAction" />
<ref bean="pFApproveStatusInfoAction" />
</list>
</property>
<property name="editActions">
<list>
<ref bean="saveScriptAction" />
<ref bean="cancelAction" />
</list>
</property>
</bean>
<!-- 卡片顯示下的按鈕 -->
<bean id="actionsOfCard" class="nc.ui.uif2.actions.StandAloneToftPanelActionContainer">
<constructor-arg ref="billForm" />
<property name="model" ref="bmModel" />
<property name="actions">
<list>
<ref bean="addAction" />
<ref bean="editAction" />
<ref bean="deleteScriptAction" />
<ref bean="defaultQueryAction" />
<ref bean="copyAction" />
<ref bean="separatorAction" />
<ref bean="separatorAction" />
<ref bean="commitScriptAction" />
<ref bean="unCommitScriptAction" />
<ref bean="approveScriptAction" />
<ref bean="uNApproveScriptAction" />
<ref bean="separatorAction" />
<ref bean="linkQueryAction" />
<ref bean="separatorAction" />
<ref bean="metaDataBasedPrintAction" />
<ref bean="metaDataBasedPrintActiona" />
<ref bean="outputAction" />
<ref bean="separatorAction" />
<ref bean="pFApproveStatusInfoAction" />
</list>
</property>
<property name="editActions">
<list>
<ref bean="saveScriptAction" />
<ref bean="cancelAction" />
</list>
</property>
</bean>
<!-- 打開節點監聽 newadd-->
<bean id="InitDataListener" class="nc.ui.pubapp.uif2app.model.DefaultFuncNodeInitDataListener">
<property name="model" ref="bmModel"/>
<property name="context" ref="context"></property>
<property name="voClassName" value="nc.vo.proadmin.threemeetings.AggThreemeetingsVO"/>
</bean>
<!-- ClosingListener 編輯態關閉節點時提示是否保存//newadd***************************************************-->
<!-- 節點關閉前校驗 -->
<bean id="ClosingListener" class="nc.ui.pubapp.common.validateservice.ClosingCheck" >
<property name="model" ref="bmModel" />
<property name="saveAction" ref="saveScriptAction" />
</bean>
<!-- 事件監聽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.proadmin.threemeetings.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.proadmin.threemeetings.ace.handler.AceAddHandler" />
</property>
</bean>
<!-- 表頭表尾字段編輯前事件 -->
<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
<property name="event" value="nc.ui.pubapp.uif2app.event.card.CardHeadTailBeforeEditEvent" />
<property name="handler">
<bean class="nc.ui.proadmin.threemeetings.ace.handler.AceHeadTailBeforeEditHandler" />
</property>
</bean>
<!-- 表頭表尾字段編輯後事件 -->
<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
<property name="event" value="nc.ui.pubapp.uif2app.event.card.CardHeadTailAfterEditEvent" />
<property name="handler">
<bean class="nc.ui.proadmin.threemeetings.ace.handler.AceHeadTailAfterEditHandler" />
</property>
</bean>
</list>
</property>
</bean>
<!--懶加載信息配置*******************************************************-->
<!-- 行號自動處理 -->
<bean id="rowNoMediator" class="nc.ui.pubapp.uif2app.view.RowNoMediator">
<property name="model" ref="bmModel" />
<property name="editor" ref="billForm" />
</bean>
<!-- 雙擊列表行後顯示卡片 -->
<bean id="mouseClickShowPanelMediator" class="nc.ui.pubapp.uif2app.view.MouseClickShowPanelMediator">
<property name="listView" ref="billListView" />
<property name="showUpComponent" ref="billForm" />
<property name="hyperLinkColumn" value="vbillcode" />
</bean>
<!-- 單據號 -->
<bean id="billCodeMediator" class="nc.ui.pubapp.bill.BillCodeMediator" init-method="initUI">
<property name="billForm" ref="billForm"></property>
<property name="billCodeKey" value="vbillcode"></property>
<property name="billType" value="SHGL"></property>
</bean>
<!-- Action部分 ***********************************************************-->
<!--======= 動作:[newActions] [新增] ===========-->
<bean id="addAction" class="nc.ui.pubapp.uif2app.actions.AddAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="interceptor">
<bean class="nc.ui.pubapp.uif2app.actions.interceptor.CompositeActionInterceptor">
<property name="interceptors">
<list>
<bean class="nc.ui.pubapp.uif2app.actions.interceptor.ShowUpComponentInterceptor">
<property name="showUpComponent" ref="billForm" />
</bean>
<!--此處可以擴展添加自己的攔截器-->
</list>
</property>
</bean>
</property>
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [修改] ===========-->
<bean id="editAction" class="nc.ui.pubapp.uif2app.actions.EditAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [刪除] ===========-->
<bean id="deleteScriptAction" class="nc.ui.pubapp.uif2app.actions.pflow.DeleteScriptAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="billType" value="SHGL" />
<property name="filledUpInFlow" value="true" />
<property name="actionName" value="DELETE" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<bean id="defaultQueryActionQueryTemplateContainer" class="nc.ui.uif2.editor.QueryTemplateContainer">
<property name="nodeKey" value="qt" />
<property name="context"><ref bean="context"/></property>
</bean>
<!--======= 動作:[newActions] [查詢] ===========-->
<bean id="defaultQueryAction" class="nc.ui.pubapp.uif2app.query2.action.DefaultQueryAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="templateContainer"><ref bean="defaultQueryActionQueryTemplateContainer" /></property>
<property name="nodeKey" value="qt"></property>
<property name="dataManager"><ref bean="bmModelModelDataManager"/></property>
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [複製] ===========-->
<bean id="copyAction" class="nc.ui.pubapp.uif2app.actions.CopyAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="copyActionProcessor"><bean class="nc.ui.proadmin.threemeetings.action.CopyActionProcessor" /></property>
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [刷新] ===========-->
<bean id="defaultRefreshAction" class="nc.ui.pubapp.uif2app.query2.action.DefaultRefreshAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="dataManager"><ref bean="bmModelModelDataManager"/></property>
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [提交] ===========-->
<bean id="commitScriptAction" class="nc.ui.pubapp.uif2app.actions.pflow.CommitScriptAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="billType" value="SHGL" />
<property name="filledUpInFlow" value="true" />
<property name="actionName" value="SAVE" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [收回] ===========-->
<bean id="unCommitScriptAction" class="nc.ui.pubapp.uif2app.actions.pflow.UnCommitScriptAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="billType" value="SHGL" />
<property name="filledUpInFlow" value="true" />
<property name="actionName" value="UNSAVEBILL" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [審批] ===========-->
<bean id="approveScriptAction" class="nc.ui.pubapp.uif2app.actions.pflow.ApproveScriptAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="billType" value="SHGL" />
<property name="filledUpInFlow" value="true" />
<property name="actionName" value="APPROVE" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [取消審批] ===========-->
<bean id="uNApproveScriptAction" class="nc.ui.pubapp.uif2app.actions.pflow.UNApproveScriptAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="billType" value="SHGL" />
<property name="filledUpInFlow" value="true" />
<property name="actionName" value="UNAPPROVE" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [聯查單據] ===========-->
<bean id="linkQueryAction" class="nc.ui.pubapp.uif2app.actions.LinkQueryAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="billType" value="SHGL" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [預覽] ===========-->
<bean id="metaDataBasedPrintAction" class="nc.ui.pubapp.uif2app.actions.MetaDataBasedPrintAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="actioncode" value="Preview"></property>
<property name="actionname" value="預覽"></property>
<property name="preview" value="true"></property>
<property name="nodeKey" value="ot" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [打印] ===========-->
<bean id="metaDataBasedPrintActiona" class="nc.ui.pubapp.uif2app.actions.MetaDataBasedPrintAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="actioncode" value="Print"></property>
<property name="actionname" value="打印"></property>
<property name="preview" value="false"></property>
<property name="nodeKey" value="ot" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [輸出...] ===========-->
<bean id="outputAction" class="nc.ui.pubapp.uif2app.actions.OutputAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="nodeKey" value="ot" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [查看審批意見] ===========-->
<bean id="pFApproveStatusInfoAction" class="nc.ui.pubapp.uif2app.actions.pflow.PFApproveStatusInfoAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="billType" value="SHGL" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [保存] ===========-->
<bean id="saveScriptAction" class="nc.ui.pubapp.uif2app.actions.pflow.SaveScriptAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="billType" value="SHGL" />
<property name="filledUpInFlow" value="true" />
<property name="actionName" value="SAVEBASE" />
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--======= 動作:[newActions] [取消] ===========-->
<bean id="cancelAction" class="nc.ui.pubapp.uif2app.actions.CancelAction">
<property name="model"><ref bean="bmModel"/></property>
<property name="editor"><ref bean="billForm"/></property>
<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
</bean>
<!--分隔按鈕-->
<bean id="separatorAction" class="nc.funcnode.ui.action.SeparatorAction" />
<bean id="exceptionHandler" class="nc.ui.uif2.DefaultExceptionHanler">
<constructor-arg><ref bean="container"/></constructor-arg>
<property name="context"><ref bean="context" /></property>
</bean>
<!-- 批量保存校驗服務類 -->
</beans>
package nc.ui.proadmin.threemeetings.ace.handler;
import nc.bs.framework.common.NCLocator;
import nc.itf.uap.IUAPQueryBS;
import nc.jdbc.framework.processor.ColumnProcessor;
import nc.ui.pub.bill.BillCardPanel;
import nc.ui.pubapp.uif2app.event.IAppEventHandler;
import nc.ui.pubapp.uif2app.event.card.CardHeadTailAfterEditEvent;
import nc.vo.pub.BusinessException;
/**
* 單據表體字段編輯後事件
* @author Administrator
*
*/
public class AceHeadTailAfterEditHandler implements IAppEventHandler<CardHeadTailAfterEditEvent>{
//查詢sql接口
IUAPQueryBS bs = NCLocator.getInstance().lookup(IUAPQueryBS.class);
@Override
public void handleAppEvent(CardHeadTailAfterEditEvent e) {
// TODO 自動生成的方法存根
BillCardPanel cpanel = e.getBillCardPanel();
String key = e.getKey();
if("pk_enterprise".equals(key)){
String param = "";
String pk_enterprise = (String)cpanel.getHeadItem("pk_enterprise").getValueObject();
String sql = "SELECT NAME FROM EQUITYMAN_ENTERPRISE WHERE PK_ID = '" + pk_enterprise +"'";
if(null != pk_enterprise && !"".equals(pk_enterprise.trim())){
try {
param = (String)bs.executeQuery(sql, new ColumnProcessor());
} catch (BusinessException e1) {
// TODO 自動生成的 catch 塊
e1.printStackTrace();
}
cpanel.setHeadItem("enterprisename", param);
}
}
}
}
-