<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
	<!-- 环境变量 -->
	<bean id="context" class="nc.vo.wa.pub.WaLoginContext" />

	<!-- 应用服务类，负责薪资规则表卡片模型操作的处理 -->
	<bean id="modelService" class="nc.ui.wa.ruleex.model.WaRuleModelService" />
	<!-- 应用服务类，负责左树模型操作的处理 -->

	<!-- model配置附件 -->
	<bean id="boadatorfactory" class="nc.vo.bd.meta.BDObjectAdpaterFactory" />

	<!-- 管理应用模型 -->
	<bean id="waRuleModel" class="nc.ui.wa.ruleex.model.WaRuleModel">
		<property name="service" ref="modelService"></property>
		<property name="businessObjectAdapterFactory" ref="boadatorfactory"></property>
		<property name="context" ref="context"></property>
	</bean>

	<!-- model数据入口 -->
	<!-- DataManager -->
	<bean id="modelDataManager" class="nc.ui.wa.ruleex.model.WaRuleDataManager">
		<property name="model" ref="waRuleModel"></property>
		<property name="service" ref="modelService"></property>
		<property name="context" ref="context"></property>
	</bean>

	<!-- 模板容器，负责对模板的统一装载 -->
	<bean id="templateContainer" class="nc.ui.uif2.editor.TemplateContainer"
		init-method="load">
		<property name="context" ref="context" />
		<property name="nodeKeies">
			<list>
				<value>WageformVO</value>
				<value>prinrule</value>
			</list>
		</property>
	</bean>

	<!-- 列表视图 -->
	<bean id="listView" class="nc.ui.hr.uif2.view.HrBillListView"
		init-method="initUI">
		<property name="model" ref="waRuleModel"></property>
		<property name="multiSelectionEnable">
			<value>false</value>
		</property>
		<property name="templateContainer" ref="templateContainer"></property>
		<property name="nodekey" value="WageformVO" />
	</bean>

	<!--卡控件-->
	<bean id="billFormEditor" class="nc.ui.wa.ruleex.view.WaRuleForm"
		init-method="initUI">
		<property name="model" ref="waRuleModel"></property>
		<property name="nodekey" value="WageformVO"></property>
		<property name="templateContainer" ref="templateContainer" />
		<property name="tabActions">
			<list>
				<ref bean="addRowAction" />
				<ref bean="delRowAction" />
				<ref bean="upRowAction" />
				<ref bean="downRowAction" />
			</list>
		</property>
	</bean>
	<!-- 组织面板 -->
	<bean id="orgPanel" class="nc.ui.hr.uif2.view.PrimaryOrgPanel"
		init-method="initUI">
		<property name="model" ref="waRuleModel" />
		<property name="dataManager" ref="modelDataManager" />
		<property name="pk_orgtype" value="HRORGTYPE00000000000" />
	</bean>
	<!-- 界面元素 ###########################################################-->
	<bean id="cardEditorActions" class="nc.ui.uif2.actions.StandAloneToftPanelActionContainer">
		<constructor-arg>
			<ref bean="billFormEditor" />
		</constructor-arg>
		<property name="actions">
			<list>
				<ref bean="addTableAction" />
				<ref bean="editTablection" />
				<ref bean="delTableAction" />
				<ref bean="copyTableAction" />
				<ref bean="separatorAction" />
				<ref bean="separatorAction" />
				<ref bean="printActionGroup" />
			</list>
		</property>
		<property name="editActions">
			<list>
				<ref bean="saveAction" />
				<ref bean="separatorAction" />
				<ref bean="cancelAction" />
			</list>
		</property>
		<property name="model" ref="waRuleModel" />
	</bean>

	<bean id="listViewActions" class="nc.ui.uif2.actions.StandAloneToftPanelActionContainer">
		<constructor-arg>
			<ref bean="listView" />
		</constructor-arg>
		<property name="actions">
			<list>
				<ref bean="addTableAction" />
				<ref bean="editTablection" />
				<ref bean="delTableAction" />
				<ref bean="copyTableAction" />
				<ref bean="separatorAction" />
				<ref bean="refreshAction" />
				<ref bean="separatorAction" />
				<ref bean="walistprintActionGroup" />
			</list>
		</property>
	</bean>

	<bean id="toftpanelActionContributors" class="nc.ui.uif2.actions.ActionContributors">
		<property name="contributors">
			<list>
				<ref bean="listViewActions" />
				<ref bean="cardEditorActions" />
			</list>
		</property>
	</bean>

	<!--异常关闭处理-->
	<bean id="ClosingListener" class="nc.ui.uif2.FunNodeClosingHandler">
		<property name="model" ref="waRuleModel" />
		<property name="saveaction" ref="saveAction" />
		<property name="cancelaction" ref="cancelAction" />
	</bean>

	<!--
		Actions ###########################################################
	-->
	<!-- 新增表 -->
	<bean id="addTableAction" class="nc.ui.wa.ruleex.action.WaRuleAddAction">
		<property name="model" ref="waRuleModel" />
		<property name="interceptor">
			<ref bean="managerModelCheckInterceptor" />
		</property>
	</bean>

	<!-- 复制表 -->
	<bean id="copyTableAction" class="nc.ui.wa.ruleex.action.WaRuleCopyTableAction">
		<property name="model" ref="waRuleModel" />
		<property name="editor" ref="billFormEditor" />
		<property name="interceptor">
			<ref bean="managerModelCheckInterceptor" />
		</property>
	</bean>
	<!-- 编辑表 -->
	<bean id="editTablection" class="nc.ui.wa.ruleex.action.WaRuleEditAction">
		<property name="model" ref="waRuleModel" />
		<property name="interceptor">
			<ref bean="managerModelCheckInterceptor" />
		</property>
	</bean>
	<!-- 删除表 -->
	<bean id="delTableAction" class="nc.ui.wa.ruleex.action.WaRuleDeleteAction">
		<property name="model" ref="waRuleModel" />
		<property name="interceptor">
			<ref bean="managerModelCheckInterceptor" />
		</property>
	</bean>
	<!--增加子行 -->
	<bean id="addRowAction" class="nc.ui.wa.ruleex.action.WaRuleAddLineAction">
		<property name="model" ref="waRuleModel" />
		<property name="cardPanel" ref="billFormEditor" />
	</bean>
	<!--删除子行 -->
	<bean id="delRowAction" class="nc.ui.wa.ruleex.action.WaRuleDelLineAction">
		<property name="model" ref="waRuleModel" />
		<property name="cardPanel" ref="billFormEditor" />
	</bean>

	<!--向上移行 -->
	<bean id="upRowAction" class="nc.ui.wa.ruleex.action.WaRuleUpLineAction">
		<property name="model" ref="waRuleModel" />
		<property name="editor" ref="billFormEditor" />
	</bean>
	<!--向下移行 -->
	<bean id="downRowAction" class="nc.ui.wa.ruleex.action.WaRuleDownLineAction">
		<property name="model" ref="waRuleModel" />
		<property name="editor" ref="billFormEditor" />
	</bean>
	<!--保存 -->
	<bean id="saveAction" class="nc.ui.wa.ruleex.action.WaRuleSaveAction">
		<property name="model" ref="waRuleModel" />
		<property name="editor" ref="billFormEditor" />
		<property name="validator">
			<list>
				<ref bean="ruleNotNullValidator" />
				<ref bean="ruleAppValidator" />
			</list>
		</property>
	</bean>
	<!--取消 -->
	<bean id="cancelAction" class="nc.ui.wa.ruleex.action.WaRuleCancelAction">
		<property name="model" ref="waRuleModel" />
		<property name="editor" ref="billFormEditor" />
	</bean>
	<!--刷新 -->
	<bean id="refreshAction" class="nc.ui.wa.ruleex.action.WaRuleFreshAction">
		<property name="model" ref="waRuleModel" />
		<property name="dataManager" ref="modelDataManager"></property>
		 <property name="formEditor" ref="billFormEditor" />
	</bean>
	<!--首页 -->
	<bean id="firstLineAction" class="nc.ui.uif2.actions.FirstLineAction">
		<property name="model" ref="waRuleModel" />
	</bean>
	<!--末页 -->
	<bean id="lastLineAction" class="nc.ui.uif2.actions.LastLineAction">
		<property name="model" ref="waRuleModel" />
	</bean>
	<!--下一页 -->
	<bean id="nextLineAction" class="nc.ui.uif2.actions.NextLineAction">
		<property name="model" ref="waRuleModel" />
	</bean>
	<!--上一页 -->
	<bean id="preLineAction" class="nc.ui.uif2.actions.PreLineAction">
		<property name="model" ref="waRuleModel" />
	</bean>
	<!--打印 -->
	<bean id="printActionGroup" class="nc.funcnode.ui.action.GroupAction">
		<property name="code" value="Print"></property>
		<property name="name">
			<bean class="nc.ui.uif2.I18nFB">
				<property name="resDir" value="xmlcode" />
				<property name="defaultValue" value="打印" />
				<property name="resId" value="X60130002" />
			</bean>
		</property>
		<property name="actions">
			<list>
			    <ref bean="TemplatePrintAction" />
				<ref bean="TemplatePreviewAction" />
				<ref bean="cardOutPut" />
			</list>
		</property>
	</bean>
	<bean id="walistprintActionGroup" class="nc.funcnode.ui.action.GroupAction">
		<property name="code" value="Print"></property>
		<property name="name">
			<bean class="nc.ui.uif2.I18nFB">
				<property name="resDir" value="xmlcode" />
				<property name="defaultValue" value="打印" />
				<property name="resId" value="X60130002" />
			</bean>
		</property>
		<property name="actions">
			<list>
			    <ref bean="waListprintAction" />
				<ref bean="walistpreviewAction" />
				<ref bean="outputAction" />
			</list>
		</property>
	</bean>
	<bean id="waListprintAction" class="nc.ui.hr.uif2.action.print.DirectPrintAction">
		<property name="model" ref="waRuleModel" />
		<property name="listView" ref="listView" />
	</bean>
	<bean id="walistpreviewAction" class="nc.ui.hr.uif2.action.print.DirectPreviewAction">
		<property name="model" ref="waRuleModel" />
		<property name="listView" ref="listView" />
	</bean>
	<bean id="outputAction" class="nc.ui.hr.uif2.action.print.ExportListAction">
		<property name="model" ref="waRuleModel" />
		<property name="listView" ref="listView" />
	</bean>  
	 
	 
	<bean id="datasource" class="nc.ui.wa.ruleex.action.WaRuleDataSource">
		<property name="model" ref="waRuleModel" />
		<property name="singleData" value="true" />
	</bean>
	<bean id="TemplatePreviewAction" class="nc.ui.hr.uif2.action.print.TemplatePreviewAction">
		<property name="model" ref="waRuleModel" />
		<property name="nodeKey" value="prinrule"/>
		<property name="printDlgParentConatiner" ref="billFormEditor" />
		<property name="datasource" ref="datasource" />
	</bean>
	<bean id="TemplatePrintAction" class="nc.ui.hr.uif2.action.print.TemplatePrintAction">
		<property name="model" ref="waRuleModel" />
		<property name="nodeKey" value="prinrule"/>
		<property name="printDlgParentConatiner" ref="billFormEditor" />
		<property name="datasource" ref="datasource" />
	</bean>
	<bean id="cardOutPut" class="nc.ui.hr.uif2.action.print.ExportCardAction">
		<property name="model" ref="waRuleModel" />
		<property name="nodeKey" value="prinrule"/>
		<property name="printDlgParentConatiner" ref="billFormEditor" />
		<property name="datasource" ref="datasource" />
	</bean>
	



	

	<!-- 分隔 -->
	<bean id="separatorAction" class="nc.funcnode.ui.action.SeparatorAction" />

	<!-- 薪资规则检验类 配置-->
	<bean id="ruleAppValidator" class="nc.ui.wa.ruleex.validator.WaRuleAppValidator" />
	<bean id="ruleNotNullValidator" class="nc.ui.hr.uif2.validator.BillFormNotNullValidator">
		<property name="billForm" ref="billFormEditor" />
	</bean>
	<!-- exception & intercept & listenner-->
	<!-- 如果是DefaultExceptionHanler，则无需注入，系统自动设置 -->
	<!-- 管控模式的的数据可操作性的校验 -->
	<bean id="managerModelCheckInterceptor" class="nc.ui.wa.ruleex.action.WaRuleManagerModelCheckInterceptor">
		<property name="appModel">
			<ref bean="waRuleModel" />
		</property>
	</bean>

	<!-- 界面元素 ###########################################################-->
	<!-- 卡片工具栏 -->
	<!-- 返回按钮 -->
	<bean id="editorReturnAction" class="nc.ui.uif2.actions.ShowMeUpAction">
		<property name="goComponent" ref="listView" />
	</bean>
	<bean id="editorToolBarPanel" class="nc.ui.uif2.tangramlayout.CardLayoutToolbarPanel">
		<property name="model" ref="waRuleModel" />
		<property name="titleAction" ref="editorReturnAction" />
		<property name="actions">
			<list>
				<ref bean="firstLineAction" />
				<ref bean="preLineAction" />
				<ref bean="nextLineAction" />
				<ref bean="lastLineAction" />
			</list>
		</property>
	</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="showMode" value="CardLayout" />
				<property name="tabs">
					<list>
						<bean class="nc.ui.uif2.tangramlayout.node.VSNode">
							<property name="showMode" value="NoDivider" />
							<property name="up">
								<bean class="nc.ui.uif2.tangramlayout.node.CNode">
									<property name="component" ref="orgPanel" />
								</bean>
							</property>
							<property name="down">
								<bean class="nc.ui.uif2.tangramlayout.node.CNode">
									<property name="component" ref="listView" />
								</bean>
							</property>
							<property name="dividerLocation" value="30f" />
						</bean>
						<bean class="nc.ui.uif2.tangramlayout.node.VSNode">
							<property name="showMode" value="NoDivider" />
							<property name="up">
								<bean class="nc.ui.uif2.tangramlayout.node.CNode">
									<property name="component" ref="editorToolBarPanel" />
								</bean>
							</property>
							<property name="down">
								<bean class="nc.ui.uif2.tangramlayout.node.CNode">
									<property name="component" ref="billFormEditor" />
								</bean>
							</property>
							<property name="dividerLocation" value="26f" />
						</bean>
					</list>
				</property>
			</bean>
		</property>
		<property name="model" ref="waRuleModel" />
	</bean>
	<!-- 超链接  -->
	  <bean id="mouseClickShowPanelMediator" class="nc.ui.hr.uif2.mediator.HyperLinkClickMediator">
		<property name="model" ref="waRuleModel"/>
		<property name="showUpComponent" ref="billFormEditor"/>
		<property name="hyperLinkColumn" value="code"/>
	  </bean>
</beans>