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):
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 |
tr>
boolean |
|
check button |
datetime |
devexpres S.expressapp.web.editors.aspx.aspXdatetimeproertyeditor |
time frame |
enum |
devexpress.expressapp.web.editors.aspx.aspxenumproertyeditor | TD style= "BORDER:0;PADDING:0;" > dropdown box
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>