Add an Item to the New Action 在新建按钮中增加一个条目
In this lesson, you will learn how to add an item to the New Action (NewObjectViewController.NewObjectAction). The Event business class from the Business Class Library will be used.
在本课中,您将学习如何在新建按钮(NewObjectViewController.NewObjectAction)中增加一个新的条目。将使用业务类库中Event类型。
Note 注意
Before proceeding, take a moment to review the following lessons.
在继续之前,请花点时间复习以下课程。
- Place an Action in a Different Location
- Add a Class from the Business Class Library and Use the Scheduler Module (XPO/EF)
- 将操作放置在其他位置
- 从商务舱库中添加类并使用计划程序模块 (XPO/EF)
The New Action's items are defined in the Application Model by child nodes of the CreatableItems node. So, to add an item to the New Action, it is necessary to add a child to the CreatableItems node. By default, business objects whose declarations are decorated by the CreatableItemAttribute or DefaultClassOptionsAttribute can be created via the New Action from any View. However, the Event class (added in the Add a Class from the Business Class Library (XPO) topic) has none of these attributes applied. This class is declared in the Business Class Library. Although it is possible to modify the library sources and recompile the library, it is more convenient to make customizations in the Application Model.
新操作的项在应用程序模型中由 CreatableItems 节点的子节点定义。因此,要将项添加到"新建操作"中,必须将子项添加到 CreatableItems 节点。默认情况下,其声明由 CreatableItem 属性或默认类选项属性修饰的业务对象可以通过任何视图中的"新操作"创建。但是,事件类(在从 Business 类库 (XPO) 主题添加类中添加)没有应用这些属性。此类在商务舱库中声明。尽管可以修改库源并重新编译库,但在应用程序模型中进行自定义更为方便。
Invoke the Model Editor by double-clicking the Model.DesignedDiffs.xafml file from the MySolution.Module project. In the tree view, navigate to the CreatableItems node. If you expand this node, you will see the items that correspond to the business classes used in your application. These items were generated because the DefaultClassOptions attribute is applied to the corresponding classes. To add another item, right-click the CreatableItems node, and choose Add... | CreatableItem.
通过双击"模型.设计Diffs.xafml"文件来调用模型编辑器。在树视图中,导航到可创建项节点。如果展开此节点,您将看到与应用程序中使用的业务类对应的项。生成这些项目是因为 DefaultClassOptions 属性应用于相应的类。要添加其他项目,请右键单击可创建项节点,然后选择"添加..."可克雷项。

For the newly created node, select "Event" in the ModelClass dropdown list. The Caption property will automatically be set to "Scheduler Event".
对于新创建的节点,在"模型类"下拉列表中选择"事件"。"标题"属性将自动设置为"计划程序事件"。。

Run the WinForms or ASP.NET application. Notice that the Scheduler Event item has been added to the New Action's dropdown list. This item allows you to create Event objects, when objects of another type are displayed in the List View. Also note that an image has already been assigned to this item.
运行 WinForms 或ASP.NET应用程序。请注意,计划程序事件项已添加到"新操作"的下拉列表中。当另一种类型的对象显示在列表视图中时,此项允许您创建事件对象。另请注意,图像已分配给此项目。

You can see the changes made in this lesson in the Model Editor invoked for the Model.DesignedDiffs.xafml file located in the Main Demo | MainDemo.Module project. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/
您可以在本课中为模型调用的模型编辑器中所做的更改。主演示模块项目。主演示应用程序安装在%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/
.
Add an Item to the New Action 在新建按钮中增加一个条目的更多相关文章
- Add an Item to the Navigation Control 将项目添加到导航控件
In this lesson, you will learn how to add an item to the navigation control. For this purpose, the N ...
- json在action,$.ajax{}中的使用
首先需导入包:ezmorph-1.0.4.jar Action中的调用的方法: public void getObject(){ try { if(cname!=null&& ! ...
- java 从一个工程action 跳转到另外一个工程action
实现功能:java 从一个工程action 跳转到另外一个工程action 在我们实际编程的过程中,大家一定遇到过这种情况,那就是在一个工程中,需要使用到另外一个工程的实体Bean和方法.那么遇到这种 ...
- Struts2学习笔记 - Action篇<配置文件中使用通配符>
有三种方法可以使一个Action处理多个请求 动态方法调用DMI 定义逻辑Acton 在配置文件中使用通配符 这里就说一下在配置文件中使用通配符,这里的关键就是struts.xml配置文件,在最简单的 ...
- listview当选中某一个item时设置背景色其他的不变
listview当选中某一个item时设置背景色其他的不变: 可以使用listview.setOnFoucsChangeListener(listener) ; /** * listview获得焦点和 ...
- ASP.NET查询页面设置form的action属性只弹出一个页面,并且每次将页面设置到最前
原文:ASP.NET查询页面设置form的action属性只弹出一个页面,并且每次将页面设置到最前 背景 当数据量大.查询条件复杂,多样多的时候,我们可能需要单独做一个查询界面,当用户选择设置了相关的 ...
- struts2 从一个action跳转到另一个action的struts.xml文件的配置
解释: 想要用<result>跳转到另一个action,原来的配置代码是: <action name="insertDept" class="strut ...
- 配置python+mod_wsgi+apache 时 在浏览器中访问服务器时报错:Invalid HTTP_HOST header: 'XXXXX'. You may need to add u'XXXXX' to ALLOWED_HOSTS,在setting.py中添加‘*”无效的原因
配置python+mod_wsgi+apache 时 在浏览器中访问服务器时报错:Invalid HTTP_HOST header: 'XXXXX'. You may need to add u'XX ...
- struts2 在 Action 或 Interceptor 中获取 web.xml 中配置的 <context-param> 参数 (这是我的第一篇博文,哈哈。)
最近为了改一个问题,想加一个控制开关,就在web.xml 中配置了一个 <context-param> 参数,并在 Action 或 Interceptor 中获取参数值. 1.在 web ...
随机推荐
- C语言笔记 08_函数指针&回调函数&字符串&结构体&位域
函数指针 函数指针是指向函数的指针变量. 通常我们说的指针变量是指向一个整型.字符型或数组等变量,而函数指针是指向函数. 函数指针可以像一般函数一样,用于调用函数.传递参数. 函数指针变量的声明: / ...
- bsoj5988 [Achen模拟赛]期望 题解
bsoj5988 Description [题目背景] NOI2018 已经过去了许久,2019 届的 BSOIer 们退役的退役,颓废的颓废,计数能力大不如前.曾经的数数之王 xxyj 坦言:&qu ...
- Dubbo简介与基本概念
场景 分布式系统的发展演变以及RPC简介: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/103555049 Dubbo简介 Ap ...
- deinit 没执行
写了一个自定义的UIView,其中包含代理 然后设置UIViewController为此UIView的代理 结果UIViewController里的deinit没执行,导致内存 ...
- IT兄弟连 HTML5教程 DIV+CSS网页标准化布局 小结及习题
小结 DIV+CSS布局页面的优势:表现和内容相分离.代码简洁,提高页面浏览速度.易于维护和改版.提高搜索引擎对网页的索引效率.每个HTML元素都可以看作一个区块,类似于装了东西的盒子,称为盒子模式. ...
- IT兄弟连 HTML5教程 CSS3属性特效 渐变3
4 径向渐变 CSS3径向渐变是圆形或椭圆形渐变.颜色不再沿着一条直线轴变化,而是从一个起点朝所有方向混合.但相对线性渐变要比径向渐变复杂的多. 径向渐变的格式如下: radial-gradient ...
- COSCon'19 | 如何设计新一代的图数据库 Nebula
11 月 2 号 - 11 月 3 号,以"大爱无疆,开源无界"为主题的 2019 中国开源年会(COSCon'19)正式启动,大会以开源治理.国际接轨.社区发展和开源项目为切入点 ...
- java的各种日志框架
本文是作者原创,版权归作者所有.若要转载,请注明出处.文章中若有错误和疏漏之处,还请各位大佬不吝指出,谢谢大家. java日志框架有很多,这篇文章我们来整理一下各大主流的日志框架, 包括log4j ...
- typeORM 多对多关系不同情况的处理
本文以RBAC权限管理中的用户和角色举例,两个实体存在多对多的关系,一个用户拥有多个角色,一个角色属于多个用户.typeorm的中文文档没有对自定义中间表的说明,发现英文有相关说明,但示例代码貌似有问 ...
- 关于华为模拟器eNSP-防火墙USG6000V怎么重装镜像
一.首先关闭eNSP软件 二.打开Oracle VM VirtualBox 三.单击VirtualBox “管理 - 虚拟介质管理”,将vfw_usg.vdi下面的子链接释放然后删除 四.最后回到主界 ...