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 ...
随机推荐
- Neo4j安装过程详解
在安装neo4j之前,需要安装Java JRE,并配置Java开发环境,然后安装neo4j服务. 一.CentOS下安装 1.下载Neo4j 去官网下载最新的neo4j,选择社区版.地址:https: ...
- React的世界观及与Vue之比较
写在前面:本文谈论的是主观的个人感受,不追求立场的“客观.公正”,因此我下面所说的很可能是错的,欢迎交流指正. 我学习前端时,跟大部分beginner一样,学的第一个框架是Vue,入职后也一直写Vue ...
- vscode 设置免密远程
第一步: 生成秘钥 ssh-keygen -t rsa 生成 id_rsa id_rsa.pub cat id_rsa.pub >> authorized_keys 将私钥文件id_rs ...
- laravel 框架源码分析
laravel框架的文档中的例子很多时候不是很明显,所以想要真正的使用好这个框架,我们可以尝试去阅读它源码中的注释(不得不说laravel源码的注释还是很详细的). 我们先来看一下laravel 的文 ...
- Java 添加超链接到Word文档
对特定元素添加超链接后,用户可以通过点击被链接的元素来激活这些链接,通常在被链接的元素下带有下划线或者以不同的颜色显示来进行区分.按照使用对象的不同,链接可以分为文本超链接,图像超链接,E-mail链 ...
- 某酒店建筑设计CAD施工图
本素材为某酒店建筑设计CAD施工图,其中包涵的有酒店室内装修图纸.各个标间房屋改造图以及酒店场外建筑施工图.其中图纸的格式都是为dwg格式的.想要查看图纸就可以使用CAD看图软件来进行查看.以下就是一 ...
- swiper 轮播中常用的效果,持续更新
swiper一款非常好用的轮播插件,支持移动端和PC端,用过很多次了,这次简单的总结一下.方便以后查找使用,说明一下,下面的例子是基于swiper 4.0+版本的,如果你是其他的版本,请自行前往官网查 ...
- 深入解析ReentrantReadWriteLock
前言: 在Java的锁中很多锁都是同一时刻只允许一个线程访问,今天就来看看一个特殊的锁——读写锁.它的特殊之处就在于同一时刻可以运行多个读线程访问或者有一个写线程在访问.能够大大的提高并发性和吞吐量 ...
- 深挖的Java源代码之Integer.parseInt()vs Integer.valueOf()
Integer.parseInt()和Integer.valueOf()都是用来将String转换为Int的,但是为什么Java会提供两个这样的方法呢,他们如果是同样的操作,岂不是多此一举? 我们来深 ...
- [转载]——Automatic Tuning of Undo_retention Causes Space Problems (文档 ID 420525.1)
Automatic Tuning of Undo_retention Causes Space Problems (文档 ID 420525.1) 转到底部 In this Document Sy ...