Friday, August 30, 2013

Model View inheritance in next eXpandFramework version

see also http://apobekiaris.blogspot.gr/2013/11/partial-view-inheritance.html

Right now in XAF it is possible to Clone an Application Model node by simply right click on it and choose Clone from the context menu. What will happen is that an identical node will be created. However by design, further modifications are not synchronized between mother-child nodes. I am going to demonstrate a different approach that does synchronize child nodes and you can find it in eXpandFramework 13.1.6.9 or later when using any module.
In the next image we see two Application Model views, first the MDO_DetailView -the base node- and then the RDO_DetailView which its ModelClass.Type descents from the MDO_DetailView ModelClass.Type.
image
In any Object View it is now possible to add MergeDifference items like the “Everything MDO” we see in the above picture. The Lookup datasource of the View attribute enumerates all views of the hierarchy chain of the current View.ModelClass.Type. For now, there are two Strategies (Everything and Only Layout). The merging algorithm will create a model node out of the differences of all loaded modules. For example the RDO_DetailView will have the modified/bold Layout of the MDO_DetailView layout as startup layout.
Forgot to mention that in this version you need to re open the Model Editor every time you make a change in a MergedDifferences collection.
For any questions, feel free to use the eXpandFramework forums.
Happy XAF’ing to all!

Subscribe to XAF feed
Subscribe to community feed

DiggIt!

0 comments:

Post a Comment