Search This Blog

Loading...

Tuesday, September 9, 2014

Example of a custom PropertyEditor based on the ASPxColorEdit control

I wanted to share an example of a custom XAF Property Editor for viewing and editing System.Drawing.Color properties on the Web. This is what it looks like in the UI:


This custom PropertyEditor uses the built-in ASPxColorEdit control from our ASP.NET Suite and provides a bit better UX than the default ASPxColorPropertyEditor:

Sunday, August 17, 2014

Are you ready for some serious Xafari?

I am a bit late with this announcement, and you might have already been aware of the XAFARI.NET platform from our news feeds in developer groups, but here we go. 

If you do not recall my introduction blog post "Meet XAFARI - a business platform from Galaktika Corp", please refresh your memory first to learn more on this powerful business platform, which is built on top of eXpressApp Framework (XAF) to provide more reusable modules and components for various verticals.

The main reason for this post is that XAFARI got an English version of their website (it was only in Russian previously), which means that more XAFers could benefit from the numerous features this commercial third-party platform provides:



To learn more on pricing, features and services, including but not limited to access to the source code, online documentation, priority support, etc), check out http://galaktikasoft.com/xafari/buy (of course, free trial included):

Monday, August 11, 2014

Personalizing and securing the runtime Model Editor for your end-users


There is the word "tricks" in the name of my blog, and today I really want to tell you about something, which is in my opinion, deserves to be called a real trick. At least I am sure that I am going to highlight a solution, which not everyone is aware of and using in his production app. But, don't worry, because this solution is based on the well-tested core functionality of the framework and approach described in the XAF documentation: How to: Access Business Object Metadata.

Scenario

In the majority of customer projects I have seen, end-users are not using the runtime Model Editor, most likely because this developer tool can be confusing, and it is quite easy to "shoot yourself the foot" with it. This blog post is devoted to showing a way of customizing the Model Editor to limit end-users to see only certain nodes. For instance, one may want regular users to see only the Options and Validation nodes, while allowing full customization to administrators. Also, many may want to see a custom text within the Model Editor form header instead of the default XAF text.



Wednesday, August 6, 2014

Forcing Boolean Property Editor to work for a string DB column

The world is not perfect and sometimes we have to deal with legacy data, which is not well organized. For instance, data which is binary by nature can be stored using predefined strings ("T"/"F" or "Y"/"N"):


Correcting data is not often possible, because this data can already be used by other information systems.
As you know, XAF automatically generates editors for data fields in the UI based on the field type in the ORM data model (learn more...), so in this particular case an inappropriate editor (text box) will be used if we leave the default mapping to a string column "as is" - a text box instead of a check box or drop down box with the Yes/No values. In this blog post I will show you several methods on how to work around this situation and have the correct editor in the UI while keeping the underlying data table schema and data unchanged.

Wednesday, July 30, 2014

Checking if an object is new or not within a criterion string

Typical usage scenarios

I remember registering a corresponding feature request in order to make it easier for XAF developers to accomplish the following types of tasks:
a) Validating data fields for new records only; e.g., the scenario from Q440548
b) Implementing different data field appearance for new and saved records; e.g., the color or enabled state as in Q475272
c) Managing Action controls' state for new records via TargetObjectsCriteria

During these years these three scenarios stayed popular among our users (we had several dozens of trackers), so it was a natural decision for us, as framework creators, to make accomplishing this common and proven stuff easier for developers and probably end users.