Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to map a logical type to a Data Property
xomega
#1 Posted : Wednesday, August 29, 2012 5:59:31 PM(UTC)
xomega



In order to enable generation of UI data objects from the model, each logical type used by the data object's parameters should be mapped directly or indirectly to a Data Property, which are the building blocks of the UI data objects in the Xomega Framework. You can map it to either one of the standard data properties included in the framework or to any other custom property.

Normally if you extend your logical type from another base type in the model, it will automatically inherit the mapping to the Data Property from its parent. If your type does not extend any other logical type, or you just want to override the mapping to the Data Property, then the following steps outline this process.
  1. Make sure that the module element that contains your logical type declares a prefix for the "http://www.xomega.net/framework" namespace, e.g. xmlns:xfk="http://www.xomega.net/framework"
  2. Add a xfk:property element inside of the config element of your logical type definition. In the absence of such element your logical type will just inherit the Data Property from its base type if one exists.
  3. Specify the property class name by setting the class attribute.
  4. Specify the namespaces of the property by setting the namespace attribute accordingly. For the standard data properties provided by the framework the namespace will be Xomega.Framework.Properties.
  5. To validate your setup find a parameter that uses your logical type and is included in generation of the UI data objects, and then generate the Xomega Data Objects and check the type of the corresponding data property.

Here is a sample configuration that illustrates these steps.
Code:
<module xmlns="http://www.xomega.net/omodel" xmlns:xfk="http://www.xomega.net/framework">
  <types>
    <type name="invoice number" base="integer">
      <config>
        <xfk:property class="InvoiceNumberProperty" namespace="MyProject.Client.Properties"/>
      </config>
    </type>
  </types>
</module>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Copyright © 2009-2022 Xomega.Net. All rights reserved.