Search This Blog

Wednesday, June 26, 2013

DevExpress XAF Training class in Germany (October 7-11)

I'd like to repost this good news for people who want to become an XAF expert in a few days, literally.

"The next class is a European event: October 7-11 for XAF, in a new location in Germany. I will teach this myself, and the class will be in English language as usual - important to stress in Europe!

 XAF Training Event (Europe)
This class covers the eXpressApp Framework as completely as possible in the timeframe. The target is to enable you to create your own XAF based applications, and to answer any questions you have. XAF is a large product that includes many modules and targets two different platforms - the one-week timeframe of the course is the only limit on the depth of coverage!" - learn more on how XAF can help your business to build good-looking and powerful apps for both Windows and the Web in minutes:

Monday, June 17, 2013

What's New In DevExpress Documentation? (PING!)

I would like to draw your attention to the recent documentation updates, because as you know, not only product features themselves are valuable, but also good documentation that details how to use them in practice, improving your skill set and making you more productive.

Concerning XPO, I suggest you checking this link as it will make you more fluent in using the ORM Data Model Wizard, OData and other design time features:

As for XAF, check out this update to learn about new elements which you might have not used in the past:

If you want to improve your mastery for other DevExpress products, check out the full list of recent documentation updates here.

We constantly update our documentation and examples, so do not forget to check the What's New documents from time to time, because it lists more than new product features and fixed bugs.

Thursday, June 13, 2013

What are the MOST used extra modules in your XAF solutions?

We are currently in the process of the 13.2 release planning, and I would love to get a more direct input you.
We'll use this information to better prioritize requests in our features backlog, in addition to the figures and stats we already have.
So, I highly appreciate your taking time to submit your feedback.

This first survey poll we will be fully devoted to the built-in extra modules.

QUESTION: What are the MOST used extra modules in your XAF solutions?


I would ask you to focus on the ones you use MOST of the time, e.g., from project to project, and not occasionally.  You can find the list of XAF extra modules here, just in case you forgot their names:-)

Hopefully, many of you have Facebook accounts nowadays. I think that it is worth to continue this experiment if there will be a lot of different participants. I'll also keep in mind to test-drive our LinkedIn developers group (which is quite active recently) or other means, if the FB does not work well.

Do not forget to like our official XAF/XPO page (it's quite new), if you happen to be on FaceBook and like our framework and its services:-)
From this page you can regularly receive latest news about our frameworks and also participate in various surveys and discussions with other XAF developers.

See another poll from the eXpand Framework team:

Poll - Which of the following eXpand modules/features do you use most?

Friday, June 7, 2013

Advanced (JQuery UI-based) Tooltips for Detail View Items on the Web

I would like to announce another community contribution from an active XAF customer (Thanks Krzysztof!):

What it looks like?
Here is what it looks like in an XAF Web app:

Main features 
Below is the list of supported features set by the author:

- is easy defined
- uses jQuery and jQuery-ui tooltip
- supports html tags
- has no character number limit (as in standard IE browser dialog)

Example of use:

Set an attribute on your entity property:

    [Tooltip("This is a sample tooltip from an <br/><br/>(some BR tags)<br/><br/><br/><br/>attribute")]

Or set a text in Model.DesignedDiffs.xafml (in a detail view layout item).

Learn how it is implemented!
The author also carefully documented the signification source files that form this solution and you can see this info in the "Significant files" section on the contribution page.

For you to learn how this works from the XAF perspective, let me make a short dissection of his solution:

1.  As you know, XAF allows you to customize built-in UI elements or replace them with your own versions. The Views Layout on the Web is powered by the WebLayoutManager, which renders Property Editors and  other View Items defined in the Application Model in the UI using web controls and ITemplate objects. Here a custom ITemplate was created for the layout item by inheriting from the built-in LayoutItemTemplate class (see more...).

2. To tell XAF to use this new custom layout item template, the WebLayoutController class was created (see more...): it just set a property the WebLayoutManager.
Find more details on this in the DevExpress Support Center.

3. Since the solution was originally created for version 12.1, the author implemented his own ToolTipAttribute and Application Model extenders (see more...). This is is NOT required in the latest XAF versions, because XAF provides the built-in ToolTipAttribute and corresponding properties in the Application Model. Just in case you would want to define a custom attribute for decoration of business class properties in code or configuring it via the Application Model, you can see how the XAF's attribute is implemented (see at "C:\Program Files (x86)\DevExpress\DXperience 12.2\Sources\DevExpress.ExpressApp\DevExpress.ExpressApp\DevExpress.Persistent.Base\Attributes.cs" ):

4. The latter part is important, but does not require much commenting as it is standard for ASP.NET development:
  • SampleProject.Web\Default.aspx, DefaultVertical.aspx, Dialog.aspx - modified head section
  • SampleProject.Web\scripts\jquery-ui.min.js (new)
  • SampleProject.Web\scripts\jquery.min.js (new)
  • SampleProject.Web\style.css (new)
I just want to say that in the latest XAF versions you will have to apply the aforementioned changes after adding a custom ASP.NET templates per these instructions from the XAF documentation.

Hopefully, this bright contribution will be recognized by other community members and added into the eXpand Framework ( by default.

Happy XAFing and contributing, as always!

Wednesday, June 5, 2013

Discussing UI customization in XAF by example of customizing controls associated with Actions on the Web

One of the ways to access and customize controls associated with Actions on the Web is to inherit from the ProcessActionContainerHolderController class. It represents a base class from which Controllers (there is a number of standard descendants) customizing Action Container controls are derived.

For instance, imagine that we want to enable scrolling of large menu items in our Web application and want to use the following feature of our DevExpress ASP.NET menu control: ASP.NET Menu Scrolling - today I had a real customer wanting to perform this customization.

So, you can consider using the following example code in version 12.2+:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Web.SystemModule;
using DevExpress.ExpressApp.Web.Templates.ActionContainers;
using DevExpress.ExpressApp.Web.Templates.ActionContainers.Menu;
using DevExpress.Web.ASPxMenu;

namespace MainDemo.Module.Web.Controllers {
    // This is a demo controller that builds an Action with a lot of items in the UI.
    public class Class1 : ViewController {
        public Class1() {
            SingleChoiceAction dropDownMenuAction = new SingleChoiceAction(this, "Test", DevExpress.Persistent.Base.PredefinedCategory.View);
            dropDownMenuAction.ItemType = SingleChoiceActionItemType.ItemIsOperation;
            for (int i = 0; i < 100; i++) {
                dropDownMenuAction.Items.Add(new ChoiceActionItem("Test" + i.ToString(), i));
    // This is our descendant of the standard controller to access and customize controls of a required Action.
    public class EnableScrollingMenuItemsController : ProcessActionContainerHolderController {
        protected override void OnActionContainerHolderActionItemCreated(WebActionBaseItem item) {
            MenuActionItemBase menuItem = item as MenuActionItemBase;
            if (menuItem != null && menuItem.MenuItem.Menu is ASPxMenu && menuItem.Action.Id == "Test") {
                // Accessing the ASPxMenu control and customizing it according to the DevExpress ASP.NET documentation.
                ((ASPxMenu)menuItem.MenuItem.Menu).EnableSubMenuScrolling = true;

That's it and we can now run our test app (I used our MainDemo) to see the result:

What we might have learned here?

  • Controllers can be used to implement custom features in XAF, e.g. to customize a certain UI element, to change your application's flow and implement custom end-user interaction;
  • XAF provides a number of built-in Controllers and Actions that are used when generating the default UI. For instance, CRUD, validation, navigation and search features are powered by Controllers;
  • It is possible to create custom Controllers derived from built-in ones to customize the default UI generation and behavior.
  • The default XAF UI is built at runtime and consists of regular controls using the standard development techniques. The only specificity of XAF is that it focuses on reusing code where possible - think of it like about building your application from custom user controls to avoid duplicate work.
  • In XAF, you can access a required UI element or control and customize it using the approaches you are accustomed to in the traditional development with WinForms or ASP.NET frameworks. See one, two, three topics in our docs for more customization examples.

Monday, June 3, 2013

Protecting individual data fields by criteria

As you probably know, XAF comes with a built-in security module that provides ready-to-use solutions for protecting sensitive information on the table, row and field levels (check to learn more...).

I think you will be interested to know that the version 13.1 should bring an improvement in this regard - an advanced field-level protection mode that would allow you to secure individual fields rather than the whole data record by criteria (track this ticket...).

I just wanted to provide a quick update for XAF developers as we decided to keep this item Active for now, until more demos and complete documentation is available on this feature. Currently (in 13.1), we will only have a small demo in the SecurityDemo app for you to play:

You can see the configuration for this scenario in the Updater.cs file:

// Member By Criteria Operation Permissions
securityDemoRole.AddMemberAccessPermission<MemberByCriteriaSecurityObject>("Name", SecurityOperations.ReadWriteAccess, "[Name] <> 'No Read Access Object'");
securityDemoRole.AddMemberAccessPermission<MemberByCriteriaSecurityObject>("Property1;ReferenceProperty;Oid;oid", SecurityOperations.ReadWriteAccess, "[Name] = 'Fully Accessible Property Object'");

    "[Name] = 'Read-Only Property Object'"

We will officially announce this feature and mark the corresponding feature request as Closed once we are done with the learning materials. Please stay tuned!