nc 自定义Action 添加拓展按钮的方法
2015-06-08 14:51
561 查看
首先通过相关的功能注册注册相关的注册文件,然后,编写相关的配置文件,还有相关的Action类,该类继承NCaction类。
xml文件如下,action类参看原配置文件的其他它级别类。
<?xml version="1.0" encoding="gbk"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--出库单车辆GPS位置信息 -->
<bean class="nc.ui.pubapp.plugin.action.InsertActionInfo">
<property name="actionContainer" ref="actionsOfList" />
<property name="actionType" value="notedit" />
<property name="target" ref="printActionGroup" />
<property name="pos" value="after" />
<property name="action" ref="carPositionAction" />
</bean>
<bean class="nc.ui.pubapp.plugin.action.InsertActionInfo">
<property name="actionContainer" ref="actionsOfCard" />
<property name="actionType" value="notedit" />
<property name="target" ref="printActionGroup" />
<property name="pos" value="after" />
<property name="action" ref="carPositionAction" />
</bean>
<bean id="carPositionAction" class="nc.ui.so.m30.billui.action.link.SaleOrderCarPositionAction">
<property name="model" ref="ManageAppModel" />
<property name="editor" ref="billFormEditor" />
</bean>
</beans>
也可以通过重写原配置文件的方法拓展按钮,但是,要选到配置文件,点击右键,重新生成springj2ee的java文件,配置文件才能生效。
xml文件如下,action类参看原配置文件的其他它级别类。
<?xml version="1.0" encoding="gbk"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--出库单车辆GPS位置信息 -->
<bean class="nc.ui.pubapp.plugin.action.InsertActionInfo">
<property name="actionContainer" ref="actionsOfList" />
<property name="actionType" value="notedit" />
<property name="target" ref="printActionGroup" />
<property name="pos" value="after" />
<property name="action" ref="carPositionAction" />
</bean>
<bean class="nc.ui.pubapp.plugin.action.InsertActionInfo">
<property name="actionContainer" ref="actionsOfCard" />
<property name="actionType" value="notedit" />
<property name="target" ref="printActionGroup" />
<property name="pos" value="after" />
<property name="action" ref="carPositionAction" />
</bean>
<bean id="carPositionAction" class="nc.ui.so.m30.billui.action.link.SaleOrderCarPositionAction">
<property name="model" ref="ManageAppModel" />
<property name="editor" ref="billFormEditor" />
</bean>
</beans>
也可以通过重写原配置文件的方法拓展按钮,但是,要选到配置文件,点击右键,重新生成springj2ee的java文件,配置文件才能生效。
相关文章推荐
- Vijava 学习笔记之(VirtualMachine 与HostSystem 宿主关系)
- WEB 3D SVG CAD 向量 几个实施
- [Solution] Microsoft Windows 服务(1) C#创建Windows服务
- elasticsearch查询
- web.xml中load-on-startup的作用
- 百度ueditor编辑器插件开发之对话框-移动微模板插件
- html用title属性实现鼠标悬停显示文字
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- ASI简单实现网络编程
- 计算机基础一之编码方式
- 这些.NET开源项目你知道吗?让.NET开源来得更加猛烈些吧!(第二辑)
- 人生若只如初见
- elasticsearch常用命令
- Web.xml配置详解之context-param
- 正则匹配
- ZtreeMasterFile(zTree大数据量一次性加载)
- linux下overcommit_memory的问题
- 33. Search in Rotated Sorted Array
- Laravel数据库事务
- SAS中关于PDV的总结