培训day02(修改xml)

该文详细说明了如何修改XML配置文件以及Java源代码,包括复制和编辑事件处理类,调整包名,新建包,修改CopyActionProcessor.java文件中的逻辑,以及对Ldc_config.xml文件的特定部分进行更新。此外,还涉及到了代码的自动导入和补全技巧。
摘要由CSDN通过智能技术生成

培训day02(修改xml)

1.将D:\peixun\培训视频\复制、编辑前后事件类中的表头编辑前、表头编辑后、表体编辑前、表体编辑后四个java文件复制到client包下的nc.ui.yhlypx.yhlypxfkd.ace.handler中。
(修改四个java文件头上的包名)
在这里插入图片描述

2.在client包下的nc.ui.yhlypx.yhlypxfkd.ace中新建一个名为action的包,将D:\peixun\培训视频\复制、编辑前后事件类中的CopyActionProcessor.java文件复制到client包下nc.ui.yhlypx.yhlypxfkd.ace.action中,修改CopyActionProcessor.java(复制按钮),源码–>更正缩进。(这个文件里面的最后一行不该给vo赋自由态,而是应给单据赋自由态)
(ctrl+f:查找/替换)
(Agg…VO修改完,点击Agg…VO导包)
(…VO修改完,点击…VO导包)
(…BVO修改完,点击…BVO导包)
(shift+ctrl+O:自动引导类包)
(修改主键,alt+/:提示补全)
(ctrl+鼠标左击:进入一个类)
在这里插入图片描述
3.依据D:\peixun\培训视频\Ldc_config.xml修改client包下的nc.ui.yhlypx.yhlypxfkd.ace.view下的xml文件。
(6个开始复制到结束复制)
第一个:148-237(到<!-- 打开节点监听 newadd-->之前)

							<property name="name" value="卡片" />
						</bean>
					</list>
				</property>
				<property name="name" value="cardLayout" />
			<property name="showMode" value="CardLayout" />
			</bean>

		</property>
<!-- 打开节点监听 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.jych.fbhttz.AggFbhttzVO"/>
	</bean>
<!--here开始复制-->
		<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" />
			</list>
		</property>
	</bean>
	
	<!-- 卡片显示下的按钮 -->
	<bean id="actionsOfCard" class="nc.ui.uif2.actions.StandAloneToftPanelActionContainer">
		<constructor-arg ref="billForm" />
		<property name="model" ref="bmModel" />
		<!-- 此处配置的Action浏览态始终可见 -->
		<property name="actions">
			<list>
				<ref bean="addAction" />
				<ref bean="editAction" />
				<ref bean="deleteScriptAction" />
				<ref bean="defaultQueryAction" />
				<ref bean="separatorAction" />
				<ref bean="copyAction" />
				<ref bean="cardRefreshAction" />
				<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" />
				<ref bean="separatorAction" />
			</list>
		</property>
		
		<property name="editActions">
			<list>
				<ref bean="saveScriptAction" />
				<ref bean="cancelAction" />
				
			</list>
		</property>
	</bean>
<!--here结束复制-->	

第二个:276-309(到</list>之前)换四次值

				<!-- 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.jych.fbhttz.ace.handler.AceAddHandler" />
					</property>
				</bean>
			</list>
		</property>
	</bean>
<!--here开始复制-->
				<!-- 表体字段编辑前事件 -->
				<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
					<property name="event" value="nc.ui.pubapp.uif2app.event.card.CardBodyBeforeEditEvent" />
					<property name="picky" ref="childrenPicky" />
					<property name="handler">
						<bean class="nc.ui.yhhl.ldc.ace.handler.AceBodyBeforeEditHandler" />//注意此次值换具体
					</property>
				</bean>
				
				<bean class="nc.ui.pubapp.uif2app.event.EventHandlerGroup">
					<property name="event" value="nc.ui.pubapp.uif2app.event.card.CardBodyAfterEditEvent" />
					<property name="picky" ref="childrenPicky" />
					<property name="handler">
						<bean class="nc.ui.yhhl.ldc.ace.handler.AceBodyAfterEditHandler" />//注意此次值换具体
					</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.yhhl.ldc.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.yhhl.ldc.ace.handler.AceHeadTailAfterEditHandler" />//注意此次值换具体
					</property>
				</bean>
				<!--here结束复制-->

第三个:313-322(到<!--懒加载信息配置********-->之前)换一次值

			</list>
		</property>
	</bean>
<!--懒加载信息配置*******************************************************-->
	<!--懒加载,加载表体数据-->
<!--here开始复制-->	
	<bean id="childrenPicky" class="nc.ui.pubapp.uif2app.event.ChildrenPicky">
		<property name="billform" ref="billForm" />
		<property name="bodyVoClasses">
			<list>
				<value>nc.vo.yhhl.ldc.LdczhubIaoBVO</value>//写各子表
			</list>
		</property>
	</bean>
<!--here结束复制-->

第四个:386-400(到<!--======= 动作:[newActions] [删除] ===========-->之前)

	<!--======= 动作:[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>
	<!--======= 动作:[newActions] [删除] ===========-->
<!---here开始复制-->
		<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>
	</bean>
	<!---here结束复制-->

第五个:426-448(到<!--======= 动作:[newActions] [刷新] ===========-->之前)换一次值

	<!--======= 动作:[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>
		<property name="btnName" value="查询" />
	</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>
	<!---here开始复制-->
	<!--======= 动作:[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="exceptionHandler"><ref bean="exceptionHandler" /></property>
		<property name="copyActionProcessor">
			<bean class="nc.ui.yhhl.ldc.ace.action.CopyActionProcessor"></bean>//注意此次值换具体
		</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>
	</bean>
	<!---here结束复制-->

第六个:456-460(到<!--======= 动作:[newActions] [提交] ===========-->之前)

	<!--======= 动作:[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="FBTZ" />
		<property name="filledUpInFlow" value="true" />
		<property name="actionName" value="SAVE" />
		<property name="exceptionHandler"><ref bean="exceptionHandler" /></property>
	</bean>
	<!---here开始复制-->
	<bean id="cardRefreshAction" class="nc.ui.pubapp.uif2app.actions.RefreshSingleAction">
		<property name="model"><ref bean="bmModel"/></property>
	</bean>
	<!---here结束复制-->

(后面有文字注释的修改java文件对应的包名)
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

和安韩Pro

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值