Llamachant Framework Modules
* BREAKING CHANGE: We removed the Audit Trail Module from the required modules list. If you want to use the Audit Trail features in your applications, add the Audit Trail Module to your .Module project *
– New Feature: Added Audit Trail Restoring (Experimental)
– Updated IAuditTrailUser interface
– Resolved issue where counts on tabs to not clear when using the Previous and Next object actions in Web
2018-06-14 – Minor Fixes
– Resolved issue where counts on tabs do not update when using the Previous and Next object actions in Web
– Resolved issue where Show Audit Trail does not display the correct caption when using Domain Components
We have worked with clients from all around the world and we discovered that many of them wanted to implement similar features in their solutions. We collected a few of the most common requests and created a reusable module that we wanted to share with everyone!
You are welcome to download, use, modify, and distribute these modules within your application for personal or commercial applications. If you decide to use these modules, we ask the following:
- Do not sell/resell these modules. They are free for everyone to use and not for you to make money from on their own.
- Make sure you have a valid DevExpress Universal Subscription.
- Include them in your XAF applications. Consider letting us know about your projects as we love learning about XAF in the wild.
- Consider adding a link back to us on your website.
- Consider liking and following us on Facebook
- Contact Us if you have questions, suggestions, or improvements!
Before you Start
These modules are developed using XPO and are NOT Entity Framework friendly. They are provided as-is with no warranty of any kind. We hope you will find them useful additions to your solutions.
Currently, you can download the Visual Studio projects and include them in your solution. Reference them in your modules and include them via the Module Designer as you would any other XAF module. Some features require additional modules to be included from DevExpress as listed below.
If you prefer, you can get them from the Llamachant Framework (XAF) repository on GitHub
Features & Platforms
|Audit Trail Viewing||Win & Web|
|Audit Trail Restoring (Experimental)||Win & Web|
|Tracked Objects||Win & Web|
|Singleton Business Objects||Win & Web|
|Font Size||Win Only|
|Collection Counts in Tabs||Win & Web|
|SVG Skin Palettes||Win Only|
|Toolbar Options||Win & Web|
|List View Row Processing Options||Win & Web|
|Delete on Non-Aggregated Collections (Link & Unlink)||Win & Web|
|Open Object Action Caption||Win Only|
|Summary Panel Options||Win Only|
|Smooth Splash Screen Loading||Win Only|
Audit Trail Viewing
Many people add the Audit Trail Module to their solution but never allow the user to interact with it. In this module, you can enable the option to view the audit trail from any Detail View. The View Audit Trail action becomes available within the Tools container and provides the user with a popup window with the full audit history. There are 3 settings to manage the visibility of the View Audit Trail action: None, All, UserSpecific. These options are available within the Options node of the Model file. If you want to make the Audit Trail action User Specific, implement the IAuditTrailUser interface on your custom user class.
Audit Trail Restoring (Experimental)
We’ve all had that phone call where one of our users deleted a record by mistake and needs the record back. With XPO’s deferred deletion option, records are marked as deleted instead of actually being deleted. The only complication is the linking between the objects is often cleared as part of the delete process. This can lead to hours of trying to chase down all the old relationships. With this new module, you can search and restore a deleted object, and all of its related objects quickly. This is considered experimental so BACK UP YOUR DATABASE FIRST. This module also requires full auditing and the deferred deletion strategy in effect in order to work correctly. We recommend using this as a last resort by your tech crew – and not in the hands of your users. Enable this option in the Options node of the Model File. If you want to make the Restore action User Specific, implement the IAuditTrailUser interface on your custom user class
We like to think of this functionality as an Audit Trail Junior. Creation, Modification, and Deletion information is stored directly on the object within the object’s table so you can quickly see who did what. We recommend you create a custom Base Object and implement the ITrackedObject interface. Use the TrackedObjectHelper to quickly set the details of your Tracked Object. We provided this as an interface with a helper so you can easily add tracking to objects that don’t inherit from your own custom Base Object.
Singleton Business Objects
Our clients don’t often ask for these by name, but we add Singleton Business Objects to almost every application we create. Essentially, a singleton business object is designed to be a business object that there is only one of. It’s a great way to store settings directly in the database that are quickly configurable by the end user. What we do is prevent a List View of these objects from ever being shown and show the user the Detail View instead. We also prevent the user from creating or deleting these objects.
To implement a singleton business object, implement the ISingletonBO interface on your object.
Font Size (Win Only)
Our clients have requested a way to increase the application Font Size. With our module, you can enable the Font Size action from the Options node in the Model File. You can also define new font sizes in a new node under Options called Font Sizes. This solution only applies to Win applications since Web modifications would be done through CSS instead.
Collection Counts in Tabs
This is one visual element that we add to all applications as it helps users understand and locate their data. Any tab group item that contains a collection will display the count of the items within that collection in the tab name. This feature also provides an option to make the tab caption bold if items exist within the collection. Enable these options in the Options node of the Model File.
SVG Skin Palettes (Win Only)
DevExpress introduced SVG skins in version 17 of their components. We were first impressed with the look of “The Bezier” theme as it was very clean, simple, and boasted some nice shadows around dialogs. It wasn’t until we read more about the new SVG theme options that we realized there were a lot more theme options hidden inside this theme. To unlock these new Palette options, we are including a controller with some minor variations from the controller provided as a sample on the DevExpress website. This action is available by default once you select the SVG theme.
If you want to hide a toolbar from the user and prevent them from showing it again, use the new ToolbarVisible and AllowToolbarVisibilityToggle options on List Views. The toolbar will disappear and the action to show it again will be removed if you set AllowToolbarVisibilityToggle to false.
List View Row Processing Options
In some cases, you don’t want the user to open a Detail View from a List View. We added an option in the model to enable this feature. Try setting the AllowOpenDetailView option within the List View’s model.
Delete on Non-Aggregated Collections
We constantly see users delete an object rather than unlink it from a collection when using a collection that is non-aggregated. For those not familiar with Aggregated vs Non-Aggregated collections, think of it this way: An aggregated collection is a collection where the items within the collection can only belong to the object that contains the collection. An example of this is a list of Contacts on Clients. A non-aggregated collection is one where items can be pulled in or pushed back into a pool of items. For example, a list of Staff Members who attended a Meeting. Visually, the only difference between the Aggregated and Non-Aggregated collections is the availability of the Link and Unlink actions. Functionally, they behave differently, particularly during cloning and deletion. If you delete an item that has an Aggregated collection, all of the Aggregated items are also deleted. If you are cloning the item, a copy of all items in the Aggregated collection are also cloned.
The option to prevent deletion on Non-Aggregated collections can be set in 2 places:
- In the Options node of the Model File you will find a new option called AllowDeleteNonAggregatedObjects. By default, this is set to true so your XAF application will continue to behave as it does out of the box. Set this property to false to remove the Delete action from all Non-Aggregated collections.
- In the List View nodes of the Model File you will find a new option called AllowDeleteNonAggregatedObject. By default, this is set to true so your XAF application will continue to behave as it does out of the box. If the AllowDeleteNonAggregatedObjects option is set to False in the Options node, this value is overridden. However, if you explicitly change the value to True (it is bold in the model), the deletion will be allowed.
Open Object Action Caption (Win Only)
While this is a very minor item, it comes up frequently. By default the OpenObjectAction’s caption is “Open Related Record”. Because it’s positioned in the ribbon or the view’s toolbar, it’s not always clear what related record we’re talking about. To help with this, we update the caption to display the object type name when an item is selected. So if you click on the Client property within the Contact Detail View, the action will say “Open Client”. You can change the caption format in the Localization -> Texts -> OpenObjectWithCaption item in the Model File.
Enable the ShowTypeNameInOpenObject option in the Options node of the Model File to enable this new caption update. Finally, if you already have, or need to create, your own controller that inherits from the OpenObjectController, change it to inherit from OpenObjectCaptionController instead.
Summary Panel Options (Win Only)
So often we find ourselves trying to determine how many items are in a list view, or what the sum of a column is but in order to enable the grid footer (what we call the Summary Panel), you have to go into the model and enable it for that view. This option allows you to toggle the panel on or off right in the grid by right clicking on the column header. Currently, these options are available for the Grid List Editor and the Tree List Editor. These options can be enabled globally in the Options node of the Model File or on individual List Views nodes within the Model File.
Smooth Splash Screen Loading (Win Only)
Branding your application is always a good idea. There are a few options for creating a splash screen as described by DevExpress in the article How to Use a Custom Splash Screen. It has always been our preference to add a Marquee Progress Bar on the splash screen since a little animation has a big impact to the end user. We also like to provide updates as to what’s happening during the loading. To make this process easier, we have added the CustomSplashScreen object which you can use to display a custom splash screen and receive updates with smooth animation.
To implement a custom splash screen:
- Create a new form that extends SplashScreen (Example: public partial class MySplashScreen : DevExpress.XtraSplashScreen.SplashScreen)
- To accept text updates, override the ProcessCommand method and parse the “arg” argument passed in
- Example: public override void ProcessCommand(Enum cmd, object arg)
- The arg is a string that contains the Caption and Description separated by a pipe (Example: “Your Application|Loading Modules….”)
- Set your labels to these values as required (Example: labelControl1.Text = args.ToString().Replace(“|”, ” “).Trim();)
- In your Program.cs file, set your new Splash Screen (Example: winApplication.SplashScreen = new CustomSplashScreen(typeof(MySplashScreen)); )
File Type : ZIP