Search This Blog

Monday, June 26, 2017

AuditTrail - How to show the change history for the current object in a separate form instead of a nested ListView

I wanted to draw your attention to the scenario and solution in our Support Center, which were found helpful by at least 4 other XAF customers using XPO for data access. As you know, by default, we offer our users a solution based on the nested ListView, which is automatically generated when you declare a collection property like this one:

    public XPCollection<AuditDataItemPersistent> AuditTrail {
        get {
            if(auditTrail == null) {
               auditTrail = AuditedObjectWeakReference.GetAuditTrail(Session, this);
            }
            return auditTrail;
        }
    }


The solution I am promoting allows you to keep the layout less complex and invoke this rarely used or quite advanced feature from a small PopupWindowShowAction showing a ListView:


It will be interesting to hear about your preferences in this regard. Please let me know in comments. Thanks!


Thursday, June 22, 2017

How to display another web site or custom HTML inside IFRAME embedded into an XAF View

I would like to share links to the solutions for ASP.NET WebForms apps allowing you to display arbitrary HTML content in XAF Views. For instance, one may want to use it to display HTML emails in a DetailView or load a complete third-party web site. Take special note that these custom solutions are NOT based on the built-in HTML Property Editor Module and its ASPxHtmlPropertyEditor that uses the DevExpress ASPxHtmlEditor control.

The T178588 ticket describes a very basic solution for displaying a static URL within a DetailView.
The T180499  ticket provides a more complex solution where HTML content is loaded dynamically from a business class property.



Both solutions are based on a very popular way to integrate custom controls in XAF - custom View Items. A custom ViewItem is often preferred over a custom PropertyEditor when you just need to display data without editing and other capabilities. Of course, you can choose from more integration options based on your exact business requirements: Concepts > UI Construction > Using a Custom Control that is not Integrated by Default.

It would be great to hear about whether you experienced similar scenarios and which solutions you are using for them in your Web app. Please let me know in comments to this post. Thanks.

P.S.
While we are at it, it is worth noting that we do not support displaying an XAF Web app inside an IFRAME element by default.

Tuesday, June 20, 2017

Performance tuning of the saving/validation process using the PersistenceValidationController events

Regardless of how good and sophisticated your development tools are, real production use often imposes research and solving speed issues. In this tip, I will talk about tuning the Validation Module to do its best when saving a master object exposing  large collections of aggregated data. 

By default, aggregated objects are considered to be an integral part of a master object, and thus, they should be validated together with the master object, which may take significant time if you have hundreds or thousands of complex detail records. The entire detail collection will be loaded and validated in this instance.

The good news is that XAF is very flexible and has a customizable framework that provides many ways to intercept this validation process. 

Linking XAF security roles and Active Directory Security Groups by name

We have recently created a new help topic devoted to one of the popular scenarios our users described: How to: Assign the Same Permissions for All Users of an Active Directory Group. This topic demonstrates how to map XAF security roles to AD groups. When a user logs on for the first time, existing roles with names matching the user's AD group names are automatically assigned. If the user membership in AD groups was modified, the associated roles collection will be updated accordingly on the next logon. Take special note that the corresponding XAF security roles with required permissions and matching the names of AD groups must be created first!

This article also required for us to avoid confusion with the AuthenticationActiveDirectory component name, because it does not support Active Directory Security Groups out of the box.  What this component does is just allow logging by the currently logged Windows user automatically or without the logon form.  To initialize the created XAF security user record, the AuthenticationActiveDirectory authentication uses the WindowsIdentity.Name property of an object obtained via the static WindowsIdentity.GetCurrent method to get a user name in the DOMAIN\USERNAME format.

I want to point out one implementation aspect that might be unclear: why did we create a AuthenticationActiveDirectory descendant instead of handling the CustomCreateUser event, which looks simpler? The main reason for using the descendant is that with it, the synchronization of XAF security roles is easier to implement when AD groups are updated.

I hope you find this example helpful. Please let us know in comments if you experienced a similar scenario and describe how you are currently handling it. Thanks in advance!


Addition to the VisibleInXXX attributes family for controlling available types and fields in the application UI

With v16.2.6 and v17.1.3DevExpress.Persistent.Base > VisibleInReportsAttribute  can be applied to a business class property as well. When the VisibleInReports attribute is applied to a business class property, it specifies whether or not the target property is visible in the Report Designer field list.




BTW, with the introduction of the Dashboards ModuleVisibleInDashboardsAttribute was added as well. I hope you did not miss it as well.

Thursday, June 15, 2017

The recommended approach to hiding the 'Protected Content' columns and Property Editors is improved - YOUR FEEDBACK IS NEEDED!


I have recently updated the HideProtectedContentController code in the How to: Hide the 'Protected Content' Columns in a List View and Property Editors in a Detail View topic. The main change is that the HideProtectedContentController now checks if a visibility state for the target UI element is customized by existing Conditional Appearance rules before applying its own customizations.

void appearanceController_CustomApplyAppearance(object sender, ApplyAppearanceEventArgs e) {
    if(e.AppearanceObject.Visibility == null || e.AppearanceObject.Visibility == ViewItemVisibility.Show) {
        // ...
    }
}

This prevents possible conflicts with existing appearance rules.

If you are using the HideProtectedContentController code in your projects, we would greatly appreciate it if you try the updated code and share your feedback here in comments.

Please note that HideProtectedContentController may make a negative impact on the application performance in complex scenarios.

Wednesday, June 7, 2017

XPQuery changes regarding non-persistent properties in v17.1

In version 17.1, we have improved error detection in XPQuery when non-persistent properties are used in it. Previously, such queries didn't work (either failed with various exceptions or worked incorrectly) and thus there were hidden errors in your programs. Now, we throw an exception that describes which non-persistent properties are used in XPQuery to help diagnosing these errors. If such properties are used intentionally, consider implementing them using PersistentAliasAttribute or adding the ToList method call to explicitly process these properties on the client side.

Refer to the https://www.devexpress.com/kb=T523335 KB Article for examples and more details.

FreeImages.Com/sanja gjenero

Wednesday, May 31, 2017

XAF ASP.NET WebForms - Beware of the FormatException (Input string was not in a correct format) when clicking a record in a popup ListView

I want to draw your attention to the T514321: ASPxGridListEditor - FormatException is thrown when selecting an object in a lookup ListView shown from an aggregated collection issue, which is already fixed in XAF for v16.2.7/17.1.4

If you came across a similar issue (check the call stack), the highlighted thread contains the hotfix installation for v17.1.


Tip:
When you experienced an exception in DevExpress code, I recommend you locate its callstack and search for one or several topmost method names in our support database, because this behavior might be reported by someone else: https://search.devexpress.com/?q=ASPxGridViewContextMenu.SelectObject&m=SupportCenter


In addition, I recommend checking the Known Issues sections in our What's New documentation:

Tuesday, May 30, 2017

How to hide the New Action from the main menu, but still have it available inline as the New Item Row feature of ListEditor

I would like to promote a Support Center article on the subject, which I heavily updated with new code examples and implementation considerations after receiving a similar customer request yesterday.
As I found later when searching our support database, many users wanted this specific customization in nested ListViews, mainly not to overload end-users with a separate root DetailView in this inner context. I must say that I saw similar reasoning for MasterDetailMode = ListViewAndDetailView too (for this scenario, we offered a solution like this one).


I personally prefer the 2nd solution from this article, but I must admit that both solutions could be simpler, ideally. Please let our team know if you experienced a similar need and clarify exactly where and why as well as how you are solving it now. With that, we will be a better position to consider further improvements. Thanks in advance, guys!


Thursday, May 25, 2017

Improved ASPxGridListEditor performance when selecting records in the grid control


Starting with version 16.2.7, we improved the selection behavior of ASPxGridListEditor. Currently, ASPxGridView does not re-render itself when selection is changed. 

See screenshots of the Network tab in Chrome Developer Tools (F12) that demonstrates how the size and time of a response in the Opportunity_ListView of the XCRM demo is reduced. The size and time of a response is reduced about 4 times and 35% respectively.

v16.2.7, 17.1.3+












v16.2.6 and lower



Tuesday, May 23, 2017

Web - How to preserve the FullTextSearch Action filter after opening details for a record and returning back to ListView

I want to repost an interesting ASP.NET WebForms scenario and a solution for it I provided to a customer yesterday. Watch this video to see how this works:



If you are interested in having something like this, check out this Support Center thread for a relatively simple Controller.

Friday, May 19, 2017

Questions on managing the Application Model settings in the database - YOUR FEEDBACK IS NEEDED!

We are reviewing usability of the mechanism responsible for storing and managing Application Model differences in the database (aka ModelDifferenceDbStore), and hence wanted to ask you to tell us about your practical experience with it.

In order to do this, please consider these questions:
1. Differences for which levels are you currently storing in the database and how well does this work for you (shared, user, or both)?

2. Have you required customizing differences stored in the database for already deployed production apps? If so, clarify the following points:
2.1. Was this customization done for shared or user levels?

2.2. List the exact use-case scenarios that needed such customizations (e.g., a client screwed up a View layout and could not reset it back to normal)?
2.3. Which solutions and how often did you use for this customization (e.g., direct database updates, editing raw XML after enabling the Administrative UI inside the app, etc.)?
2.4. How well did your current solutions for different customizations work for you so far and what could be improved in them and why?


3. Have you considered the opportunity to customize shared or user differences using the Standalone Model Editor, which visualizes the actual differences in XML content as a nodes tree? If so, clarify the following points to help us better understand the behavior you expect from such a feature:
3.1. Do you need to customize differences for shared, user or both levels?
3.2. Taking the severeness and effect of this operation over all application users, do you think that a logon form should be shown before someone can perform this customization for security reasons? Or, how do you plan to prevent a power user from obtaining the Standalone Model Editor tool binaries and running it locally for this or even harmful purposes?


We would greatly appreciate your answering these questions or providing any other information that would help us see how the current feature works for you and what can be improved further. 

Please provide answers here in comments or rather in the Support Center to track them easier: https://www.devexpress.com/support/center/question/create
Thanks in advance.


FreeImages.com/Ronit Geller

Monday, May 15, 2017

Default XAF configuration options and feature toggles

In short post, I would like to promote the Default XAF configuration options and feature toggles knowledge base article, which lists configuration options and settings that are specified in code generated by the most recent Solution Wizard version. In most cases, these options are feature toggles used to enable new features and functionality without affecting the existing applications behavior.

FreeImages.com/John Munsch

If your XAF application is created using an older version of the Solution Wizard, you can review the KB article and enable required features manually.

With v17.1, for better discoverability and more convenience, the Solution Wizard will set the default options in a common place - the InitializeDefaults method called in the YourSolutionName.Wxx/WxxApplication.xx files. This call is wrapped in a region and contains a link to the aforementioned KB article, which will be updated in the future.

Tuesday, May 9, 2017

XAF ASP.NET WebForms v16.2 - Beware of the ArgumentException (An item with the same key has already been added) in Web Dashboards

I want to draw your attention to the T511396: Web Dashboards - ArgumentException - An item with the same key has already been added issue, which is already fixed in XAF for v16.2.7
This error can occur if the application model contains different BO Models with the same Caption and is visible in dashboards.

If you came across a similar issue (check the call stack), the highlighted thread contains a simple temporary solution (make captions different or remove the VisibleInDashboardsAttribute from classes that are not required in dashboards)  + hotfix installation.



Thursday, April 27, 2017

How to copy or clone an existing report

Today I've updated a related Support Center article where I listed several possible ways of accomplishing this task. 

I would appreciate it if you describe in comments which approach # you are using yourself or describe your own solution, if it is not listed there. Thanks in advance!

FreeImages.com/Alexander Kalina

Friday, April 21, 2017

Documentation updates with regard to ways to resize windows in XAF

We have recently updated our online documentation in this regard, so you may be interested to check it out:
    Task-Based Help > How to: Adjust the Size and Style of Pop-up Dialogs (WinForms)
    Task-Based Help > How to: Adjust the Size and Style of Pop-up Dialogs (ASP.NET)

Attentive readers could notice that the PopupWindowShowAction.CustomizePopupWindowParams event arguments now provide the new Size and Maximized properties that can be used to specify the popup window size from a platform-agnostic module in certain cases (check the end of both articles above for more details on the limitations).

Of course, these code solutions can be further improved based on your business requirements. For instance, if you want to provide a developer or application user with the capability to specify sizes in the Model Editor, you can extend required View node types (e.g., IModelView) with the Width and Height attributes in the Application Model and then modify the aforementioned code to read these attributes respectively. Refer to the eXpressApp Framework > Concepts > Application Model > Extend and Customize the Application Model in Code article for more details.


Please tell me about your experience with these solutions or about anything you would love to improve in this regard. Thanks in advance.

FreeImages.com/Carolina Rodríguez

Thursday, April 20, 2017

The Frame.GetController method may return null when the XafApplication.OptimizedControllersCreation property is set to True

With XAF v17.1Solution Wizard sets the XafApplication.OptimizedControllersCreation property to True for newly created XAF projects (existing projects will not be affected). 

To avoid possible null reference exceptions in nested List Views, always check if the Frame.GetController<ControllerType> method result is not null when the OptimizedControllersCreation property is true. The latter option is required to get faster loading of DetailView when it contains a lot of nested ListView items (learn more...).

Our online documentation was already updated to describe this optimization specificity and add these null-checks everywhere; e.g., check theses examples: onetwo. KB articles, Code Examples and popular Support Center tickets are not yet updated, but we hope to do this with time as well. Should you find missing checks in our learning materials, please contact us.

FreeImages.com/Christian Kitazume

Wednesday, April 19, 2017

ASPxColorPickerPropertyEditor - New ASPxColorEdit-based editor for color properties


With XAF v17.1, you can consider using the new DevExpress.ExpressApp.Web.Editors.ASPx.ASPxColorPickerPropertyEditor class for representing color properties. It is enabled by default only in newly created XAF v17.1+ projects (existing projects will continue using the previous ASPxColorPropertyEditor). 






This is a small feature, but it is still worth mentioning here because we received several user requests for it. Finally, we wanted to go away from the custom tailored editor we used (it was created many years ago before ASPxColorEdit) and this was a good task for a junior developer☺.

What about you? Are you using this editor in your apps? If so, please tell us more about your typical uses.

Tuesday, April 11, 2017

Web Layout Manager improvements and important changes in XAF v17.1

In the 17.1 version, we have improved the scenario of loading the ASPxPageControl tab content when XafApplication.DelayedViewItemsInitialization equals True and the Conditional Appearance module is involved. So, if you encountered missing or not fully loaded tab contents in this configuration, and had to previously adjust the application-level DelayedViewItemsInitialization or View-level DelayedItemsInitialization options to avoid this behavior (learn more...), starting with v17.1, it is possible to revert these options to True by default. 

Take special note that these improvements required us to introduce some changes, which may affect a very small group of users who created and registered custom layout group templates in WebLayoutManager. Frankly speaking, this was needed for very advanced scenarios (we could locate only a few cases in our large Support Center database), so we expect that the majority of XAF users will not be affected by these changes. Anyway, if you feel or know that you could have been affected, refer to the Web Layout Manager improvements and important changes in XAF v17.1 KB Article for more details.


BTW, have you ever created custom layout item and group templates for WebLayoutManager?:-) If so, please share your use-cases in comments. I am asking because it is quite possible that we already have better solutions for you (e.g., expandable/collapsible layout groups are already supported out-of-the-box)!

Monday, April 10, 2017

The latest XAF v16.2.6 hot fix build for missing collections in the filter editor and a few other issues

I wanted to draw your attention to the subject because the official v16.2.6 contained a few trending issues which were not covered by our automated tests till now:

http://downloads.devexpress.com/Share/DXP/170410/DevExpressComponents-16.2.6.17100.exe

Thankfully, we could provide quick fixes for them and also increased the number of unit and functional tests. Anyway, we apologize for all the inconvenience they might have caused you and your business.

The issues that can attract your attention most of all are:
T500881 - An exception thrown from a popup dialog unexpectedly terminates the whole application execution when debugging in Visual Studio

T498474 - Filter Editor - Collection properties are missing in the property list when DataAccessMode = Server or InstantFeedback after migrating to v16.2.6

Let me know if you experience any difficulties with this hot fix build.



BTW, consider checking the Known Issues section in our What's New documentation if you encounter an issue with our products, because we always inform our customers of such issues + there you can see reports from other clients. I hope you find this information helpful for the future.


Friday, April 7, 2017

More secure password generation algorithms for built-in security system classes are available in XAF v16.2 and v17.1

We have offered new options for those of you who need to deploy apps to production environments with the FIPS policy enforced (e.g., government desktop computers or highly secured web servers). XAF APIs now support FIPS compliant algorithms for more secure user passwords encryption and images hashing. 

Please refer to the article below for more details and let me know what you think of it:




Wednesday, March 29, 2017

Improving UX with Grid List Editors by disabling ALL unsupported operations for non-persistent columns in server modes (XAF v16.2.6) - YOUR FEEDBACK IS NEEDED!

In server modes, grid controls perform operations like sorting, grouping, filtering, etc. on the data store side to guarantee the best performance. Thus, columns bound to non-persistent properties (their values exist only in the client memory at runtime) cannot be used for such server-based operations and can cause exceptions (learn more...). Some of them can be detected only in the end application after navigating to a problematic grid at runtime.


With XAF 16.2.6, to prevent these situations, we have improved column creation logic in our Grid List Editors for Windows and the Web. In particular, we have disabled all server-based operations (sorting, filtering, grouping) for non-persistent properties in the ASP.NET WebForms ASPxGridListEditor and WinForms GridListEditor when DataAccessMode = Server or InstantFeedback. 

Technically, it means the following:
    1) The grid's Find Panel does not take non-persistent properties into account.
    2) The grid's Filter Editor does not display non-persistent properties in the properties tree.
    3) The grid's Auto Filter Row feature is not available for non-persistent columns.
    4) Grid column headers for non-persistent columns do not allow end-users to filter, sort, group.


See this video recorded from the WinForms version of our MainDemo:


Take special note that in XPO, calculated non-persistent properties defined using PersistentAliasAttribute or CalculatedAttribute can still be used without problems for server-based operations as previously. The only PersistentAlias attribute scenario, which may still not lead to disabled server-side operations, is when you have an aliased reference property and a grid column with a complex property path like:
YourPersistentAliasReferenceProperty.SomeNestedProperty1.SomeNestedPropertyN.
Such properties will be treated as regular non-persistent properties for now or you can disable our improvement using the feature toggle below.
For EF, calculated properties defined using CalculatedAttribute are still unsupported and treated as regular non-persistent properties mentioned above.

I do not need this behavior. How do I disable it?
With v16.2.7 (or, after installing this hot fix), you can set the PreventServerSideOperationsForNonPersistentMembers property of the DevExpress.ExpressApp.Editors > ColumnsListEditor  class to False in the overridden OnActivated method of a custom ViewController for a required ListView. Refer to the following example:

[C#]
using DevExpress.ExpressApp; using DevExpress.ExpressApp.Editors; namespace MainDemo.Module.Controllers { public class S31714_FeatureToggle : ViewController<ListView> { protected override void OnActivated() { base.OnActivated(); ColumnsListEditor columnsListEditor = View.Editor as ColumnsListEditor; if(columnsListEditor != null) { columnsListEditor.PreventServerSideOperationsForNonPersistentMembers = false; } } } }
[VB.NET]
Imports DevExpress.ExpressApp Imports DevExpress.ExpressApp.Editors Namespace MainDemo.Module.Controllers Public Class S31714_FeatureToggle Inherits ViewController(Of ListView) Protected Overrides Sub OnActivated() MyBase.OnActivated() Dim columnsListEditor As ColumnsListEditor = TryCast(View.Editor, ColumnsListEditor) If columnsListEditor IsNot Nothing Then columnsListEditor.PreventServerSideOperationsForNonPersistentMembers = False End If End Sub End Class End Namespace

Tuesday, March 28, 2017

Filtering - How to search objects within ListPropertyEditor or enabling the standard FullTextSearch Action for nested ListView

Just wanted to repost a nice tip from the old SC ticket, which I updated today:

By default, the standard FullTextSearch Action is mapped to the "FullTextSearch" category or Action Container that is physically present in the main, detail and lookup control templates. Historically, it is missing in the nested frame template, which is typically used for ListPropertyEditor, DetailPropertyEditor or DashboardViewItem, mainly not to overload their toolbar with a large text box.

If you still need full text search functionality in nested frame templates, you can consider the following solutions:

1. Create a custom nested frame template as per the Template Customization. article and manually add the "FullTextSearch" action container into it. This solution appears to be the most difficult from the implementation and further maintenance points of view.
2. Customize the default mapping of Actions to the default Action Containers in the Application Model. To do this, invoke the Model Editor and follow this video:


Take special note that It is important to make a copy of the Action definition and place it into the Action Container (e.g., Link), which is NOT present in the main, detail and lookup control templates to avoid duplication of Actions in the UI:


This solutions appears to be the easiest one from all points.

3. Enable native filtering features of the underlying grid, tree and other data bound controls used in nested ListView. For instance, the Find Panel or Auto Filter Row features also provide very good filtering experiences many of your clients will love.  The only disadvantage (which can be noticeable in advanced scenarios only) is that with the standard FullTextSearch Action you can provide common customizations for root and nested ListView using the events and other extensibility points of our FilterController, while for the native control features, you will likely have to implement platform-dependent customizations.

Friday, March 24, 2017

Faster opening of DetailView with many visible ListPropertyEditors (not in tabs) in complex XAF solutions with lots of Controllers - YOUR FEEDBACK IS NEEDED!

What is behind this optimization? 


With XAF v17.1, we have introduced some optimizations with regard to Controller creation for a Frame inside ListPropertyEditor, which is usually used to represent associated detail collections. That main idea behind this optimization is filtering out certain Controllers by their TargetXXX properties and not creating them at all .On our test machines, which are often multi-core i7 monsters with 16GB ROM, the loading time after this optimization was cut on 0.2-0.3 seconds or on 20% depending on the view configuration (we expect double time on your real client machines with budget i3-i5 or lower CPUs).

Specially for early testing 1-2 months prior to the official release, we have introduced a feature toggle in the current XAF v16.2 and showing this feature there as a preview


When should I be interested in this?


You can skip this post if you do not have many custom Controllers in your apps, because the effect of our optimization will unlikely be noticeable in your case.

You must definitely read further if you have hundreds of own Controllers + use third-party modules like Xafari/eXpand with many custom Controllers in them.

Another condition is DetailView layout configuration, which I would rather clarify with a couple screenshots:



If you have the A configuration, you will NOT benefit much from the optimization we introduced, because there is only one visible ListPropertyEditor in the active tab that affect the overall parent DetailView opening. 

If you have the B configuration, you have several visible ListPropertyEditors that require creating Controllers for their nested Frames immediately with the opening of the parent DetailView and thus slow things down a little. You can either turn our optimization on or consider hiding these ListPropertyEditors behind the tabbed group.

How do I test this right now?

Please download the latest  DevExpressComponents-16.2.5.17082.exe build and set the new XafApplication.OptimizedControllersCreation property to True in the constructor of your XafApplication descendant located in the YourSolutionName.Wxx/WxxApplication.xx file (or in the YourSolutionName.Win/Program.xx or YourSolutionName.Web/Global.asax.xx files), e.g. as follows:

namespace MainDemo.Win {
public partial class MainDemoWinApplication : WinApplication {
public MainDemoWinApplication() {
InitializeComponent();
                        this.OptimizedControllersCreation = true;
}

Monday, March 20, 2017

More enhancements to the High DPI support in WinForms XAF applications - YOUR FEEDBACK IS NEEDED!

A month ago, I announced the High DPI support in WinForms XAF applications. 

XAF team continues making improvements in this area based on your great feedback in Support Center. We would like to share our progress with you and would greatly appreciate your leaving a comment here.

Tuesday, March 14, 2017

New ways to customize the New Action's items list in XAF v16.2.5 - YOUR FEEDBACK IS NEEDED!!!

Changing the way how the New Action's items list is populated is quite an often task. The default behavior when the current types and all its descendants are added may be inappropriate in large XAF applications with a complex business objects inheritance hierarchy.



That is why we have decided to provide more built-in modes of populating this list. The available modes are listed in the DevExpress.ExpressApp.SystemModule.NewObjectActionItemListMode enumeration.

ValueDescription
DefaultThe current type and all of its descendant types are added.
ExcludeBaseTypeAll descendants of the current type are added. The current type itself is excluded.
LastDescendantsOnlyOnly the last types in the inheritance hierarchy of the current type are added.

XAF app performance: Reducing the number of simultaneous database connections



Multiple simultaneously opened connections consume your database server memory and thus, have negative impact on your application performance. To diagnose this situation, you can use the following SQL script:

SELECT 
    DB_NAME(dbid) as DBName, 
    COUNT(dbid) as NumberOfConnections,
    loginame as LoginName
FROM
    sys.sysprocesses
WHERE 
    dbid > 0
GROUP BY 
    dbid, loginame

Thankfully, there is a couple of tricks to optimize your existing apps in production (they are already applied out of the box in new projects).


Friday, March 10, 2017

XAF ASP.NET WebForms v16.2.5 - Beware of the missing Edit Action after navigating to dashboard items


I want to draw your attention to the T490025: WebEditDashboardController hides the Edit Action of ListViewController and doesn't reactivate it issue, which is already fixed in XAF for v16.2.6. This thread contains a simple temporary solution if you came across a similar use scenario (hotfix installation will be available later).



Wednesday, March 8, 2017

Preview of toast notifications using a platform-agnostic method in XAF v16.2.5 - YOUR FEEDBACK IS NEEDED!!!

I am still forcing myself to go to sleep after watching an unreal football drama in Barcelona, so I am writing this short blog post at night.
Besides Visual Studio 2017 official support, XAF v16.2.5 delivers a small gem, which I cannot hide from you too long. Remember that this is an early preview of the functionality we hope to officially release by v17.1 and which is have polished in the coming 2-3 months. So, your feedback is welcome, as always!

Typical usage

Let's modify the platform-agnostic Controller from our demo (C:\Users\Public\Documents\DevExpress Demos 16.2\Components\eXpressApp Framework\SimpleProjectManager\CS\SimpleProjectManager.Module\Controllers\ProjectTaskController.cs) by adding the Application.ShowViewStrategy.ShowMessage call at the end of the Execute event handler:
...
            markCompletedAction.Execute += (s, e) => {
                IObjectSpace viewDataContext = View.ObjectSpace;
                foreach(ProjectTask task in e.SelectedObjects) {
                    task.EndDate = DateTime.Now;
                    task.Status = ProjectTaskStatus.Completed;
                    viewDataContext.SetModified(task); // Mark the changed object as 'dirty' (only required if data properties do not provide change notifications).
                }
                viewDataContext.CommitChanges();
                //viewDataContext.Refresh(); // Optionally update the UI in accordance with the latest data changes.
                Application.ShowViewStrategy.ShowMessage(string.Format("{0} task(s) have been completed!", e.SelectedObjects.Count), InformationType.Success, 4000, InformationPosition.Top);
            };
...
Now, let's start the Windows and Web apps, select a few uncompleted tasks in the ProjectTask ListView and execute the Done! command from the menu.

Result in the UI for various platforms

Web
A nice notification window is managed using the dxToast widget (invoked via the  DevExpress.ui.notify method) from our DevExtreme HTML5/JavaScript library:



Tuesday, March 7, 2017

How to change an Application Model option globally or for multiple nodes

I have recently updated one of the articles on the subject in our support knowledge base and wanted to test-drive this content with you: https://www.devexpress.com/kb=T271022


Since the Application Model basically represents a skeleton of the application UI, based on which visual controls for supported platforms are created at runtime, updates to various options in the source UI metadata (both at design time and runtime) can be a good and often platform-agnostic alternative to customizing underlying controls directly in Controllers or other UI entities (examples: one, two, three). The most difficult thing is to perform this update at the right moment or using the right event in the View life cycle!
Even though this may sound like a quite an advanced topic, this is one of the core concepts for our framework, which I recommend you get familiar with.







Your feedback is welcome, as always!

We also hope to use this KB as a base for future updates of the online documentation at  Concepts > Application Model  for easier discoverability, so your early feedback on the main methods I described is welcome. In particular, I would greatly appreciate your comments on whether you experienced the scenarios needed runtime Application Model updates and exactly which techniques you used (e.g., #2.1, 2.2 or all ).