Custom Property Editor in Xaf

Source: Internet
Author: User
Tags datetime

Xaf is what, if you haven't heard of it, this article may not help you, but if you are looking for a solution to the same problem hopefully it will help. (Note: The examples are all under Web engineering, win engineering is the same principle)

XAF automatically generates the UI from the business class. Automatically generates the required property editors based on the types of properties of the business class. For example, for a string type attribute in a business class, a text box is generated (as seen from the interface). Generates a date selection box for the properties of the DateTime type.

Common property Editor classes are shown in the following table (under Web Engineering):

tr> TD style= "BORDER:0;PADDING:0;" > dropdown box
tpye propertyed Itortype
string< /td> devexpress.expressapp.web.editors.aspx.aspxstringproertyeditor show text box
int32 devexp Ress. ExpressApp.Web.Editors.ASPx.ASPxIntProertyEditor show adjustable digital input box
boolean check button
datetime devexpres S.expressapp.web.editors.aspx.aspXdatetimeproertyeditor time frame
enum devexpress.expressapp.web.editors.aspx.aspxenumproertyeditor
devexpress.expressapp.web.editors.aspx.aspxlookuppropertyeditor dropdown box, Typically, a one-to-many relationship is formed with this object

When you create a business class, these objects are automatically associated with the properties of the business class and do not need to be declared. You can also select a different property editor. Can be in the Xafml file application | views | Items | PropertyEditor Node or application | views | Items | PropertyEditor node found. Such as:

corresponding to the Rating property application | views | Items | PropertyEditor node:

<Application>
    <Views>
       <DetailView ID="Song_DetailView">
          <Items>
             <PropertyEditor PropertyName="Rating"
                PropertyEditorType="MySolution.Module.Web.MySolutionAspNetModule.WebStarRatingPropertyEditor" />
          </Items>
       </DetailView>
    </Views>
</Application>

corresponding to the Rating property application | Bomodel | Class | Member Node:

<Application>
    <Views>
       <DetailView ID="Song_DetailView">
          <Items>
             <PropertyEditor PropertyName="Rating"
                PropertyEditorType="MySolution.Module.Web.MySolutionAspNetModule.WebStarRatingPropertyEditor" />
          </Items>
       </DetailView>
    </Views>
</Application>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.