XAF: Enhancements to App UI Management Settings in the Database (Shipping in v15.1)

XAF Team Blog
04 June 2015

This feature was first demonstrated in our v14.2 release and based on your feedback, was one of the most popular additions to the eXpressApp Framework. For this release, we have made it even more powerful by implementing the following features:

  • The latest design-time changes made by developers to the Model.XAFML file representing shared model settings will be automatically re-read and considered by the application while debugging in Visual Studio. Technically, we have integrated a code solution from this Support Center thread under the #DEBUG directive via the XAF solution wizard so that all newly created apps have this default behavior. If you need this feature in your existing app, implement the current solution from the aforementioned thread.
  • As for updating shared model settings in production environments, you can now import the new settings from the application UI via the Import Shared Model Difference Action of ModelDifferenceViewController, which is available in WinForms apps only. Technically, this command silently loads the contents of the Model.xafml file to the Shared Model Difference object stored in the database.

             

             

 

  • Initially, there was no easy way to have application UI settings for WinForms and WebForms apps stored in the database separately. With the v15.1 release, the ModelDifferenceDbStore class constructor was extended to accept the string ContextId parameter. This allows you to pass “Win”, “Web” and other custom constants, like “Tablet”, for different applications and configure their user settings independently. To save you time, the default prefixes are automatically added for new applications by the XAF solution wizard. Existing applications can be modified as follows: 

         private void Application_CreateCustomUserModelDifferenceStore(Object sender, CreateCustomModelDifferenceStoreEventArgs e) {
                 e.Store = new ModelDifferenceDbStore((XafApplication)sender, typeof(ModelDifference), false, "Web");
                 e.Handled = true;
         }


    The code of the Create Model Differences Action of ModelDifferenceViewController was modified to take into account all the available ContextId values and create Model Difference objects in the database for each available application user.

  • Previously, the Copy Model Difference Action opened a dialog to copy model settings for the selected user to another user by fully overriding them. With our current release, you can choose to either Overwrite target model differences or Merge the source and the target using the Copy Behavior option:



    Technically, this is a smarter version of the Copy command that does not replace everything, but rather combines both differences together. At this stage, there are no special dialogs to merge only certain Application Model setting nodes as is done in the Merge Model Tool.     

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.