zoukankan      html  css  js  c++  java
  • How to: Specify a Display Member (for a Lookup Editor, Detail Form Caption, etc.)如何:指定显示成员(用于查找编辑器、详细信息表单标题等)

    Each business object used in an XAF application should have a default property. The default property value is treated as a human-readable identifier in an XAF application UI (e.g., FullName of a Contact, Subject of a Task, etc.). Default property values are displayed in the following:

    XAF 应用程序中使用的每个业务对象都应具有一个默认属性。在 XAF 应用程序 UI 中,默认属性值被视为人类可读的标识符(例如,联系人的全名、任务主题等)。默认属性值显示在以下内容中:

    • Detail View captions;
    • the leftmost columns of List Views;
    • Lookup List Views;
    • Lookup Editors in an unexpanded state.
    • 详细信息视图标题;
    • 列表视图的最左侧列;
    • 查找列表视图;
    • 查找处于未展开状态的编辑器。

    Default Property of a Business Class

    商务舱的默认属性

    It is strongly recommended that you apply the XafDefaultPropertyAttribute attribute and pass the default property name to this attribute. The default property must be declared as public and visible (not hidden using the Browsable(false)attribute). If you do not declare a default property, a GUID or Integer identifier may be displayed in the UI. These identifiers are not intended to be seen by end users and may lead to confusion.

    强烈建议您应用 XafDefaultProperty 属性属性并将默认属性名称传递给此属性。默认属性必须声明为公共和可见(不使用可浏览(false)属性隐藏)。如果不声明默认属性,则 UI 中可能会显示 GUID 或整数标识符。这些标识符不适合最终用户看到,可能会导致混淆。

    using DevExpress.ExpressApp.DC;
    // ...
    [XafDefaultProperty(nameof(Subject))]
    public class Task {
        // ...
        public string Subject { get; set; }
        // ...
    }

    Alternatively, you can use the DefaultProperty attribute from the System.ComponentModel namespace.

    或者,您可以使用 System.组件模型命名空间中的 DefaultProperty 属性。

    Tip 提示
    XAF can detect the default property automatically. If a property name is Name, or it includes the Name substring, then this property is considered default, and there is no need to specify the default property explicitly.
    XAF 可以自动检测默认属性。如果属性名称为 Name,或者它包含 Name 子字符串,则此属性被视为默认值,并且无需显式指定默认属性。

     Property Displayed in a Lookup Editor

    在查找编辑器中显示的属性

    The default property of a referenced business object is displayed in a Lookup Property Editor. If you need to use another property in lookups, use the IModelCommonMemberViewItem.LookupProperty property in the Model Editor.

    引用的业务对象的默认属性显示在查找属性编辑器中。如果需要在查找中使用其他属性,请使用模型编辑器中的 IModelCommonMemberViewItem.查找属性。

    LookupProperty

  • 相关阅读:
    【idea-部署web项目】
    【IDEA下使用tomcat部署web项目】
    【 PLSQL Developer安装、tnsnames.ora配置 解答】
    【idea--git】
    【Sping管理bean的原理】
    【关于eclipse的一些自己常用的插件】
    【Spring-任务调度】
    【mysql存储引擎】
    【mysql-索引+存储过程+函数+触发器-更新。。。】
    【转-mysql-explain介绍】
  • 原文地址:https://www.cnblogs.com/foreachlife/p/How-to-Specify-a-Display-Member-for-a-Lookup-Editor-Detail-Form-Caption-etc.html
Copyright © 2011-2022 走看看