Changes and improvements for Xafari 13.2.702 | Xafari Framework

Processing floating-point numbers

Possibility to configure the decimal point character was added:
Possibility to process optional parameters 'separator between the integer part and fractional part of the number', 'date display template'.
To configure these parameters, it is necessary to set values in section Parameters in the import mapping settings file.

Example of the section:

Database User Settings Store

  • A static method for deletion of the user settings in the DatabaseUserSettingsStore based on the UserName was added.
  • A possibility to delete the user settings from the Database was added.

Business operation customization events are divided by the business operation type:

Business operation customization events of BOExecViewController are accessible using indexed field BOExecViewController.BOEvents. The type of the business operation or the ID of the business operation can be used as the index. If the event processing subscription is made without the specification of the business operation, then the subscriber will receive messages on all business operations. Below is an example of making an event processing subscription in the code of the controller:

Functions for generating hyperlinks for use in the Drill-Down reports have been added

Functions for generating hyperlinks based on ViewShortcut, which can be used in the Drill-Down reports, have been added to the platform (module Xafari). The function is accessible using the global instance of the hyperlink manager: Xafari.XafariUrlManager.Intsance.BuildUrl(ViewShortcut shortcut)
Currently hyperlinks can be generated only in the Web version of the application. For correct generation of hyperlinks in the web-application it is necessary to add a key to section appSettings in the configuration file of the application:

<!— Base URL of the current application. It is configured in the course of rollout of the application. —>
The key must contain the base URL of the installed application. Then it will be possible to use the hyperlinks outside the context of the current active application. If the key is not specified, then relative hyperlinks, which can be used in the current application context only, will be generated. The short-cut for the ListView can include a criterion for selecting the application data. Methods extending class ViewShorcut have been developed to facilitate the generation of the hyperlink and the criterion:
  • BuildUrl() — it generates the URL based on an instance of ViewShortcut
  • SetCollectionSourceCriteria(CriteriaOperator criteria) — it specifies the criterion of the data source for the list view.
Also class XafariViewShortcut (a descendant of the ViewShortcut) was developed for working with the described functions. In addition to constructors ViewShortcut, the class has additional constructors, which make it is possible to specify the criterion:
  • public XafariViewShortcut(String viewId, CriteriaOperator collectionSourceCriteria)
  • public XafariViewShortcut(Type objectClass, CriteriaOperator collectionSourceCriteria, String viewId) Example of generating a hyperlink in the script of the report:

Electronic reports, a new type of Xafari reports, has been implemented

Generating reports as files in the required format (text files, xml, csv, etc.) for presentation of various reports and documentation to other institutions in the electronic form (for example, by E-mail) is the intended use of the electronic reports. The functionality is implemented as modules:

Xafari.Reports.File
Xafari.Reports.File.Win
Xafari.Reports.File.Web
To create a report as a file, the application developer will describe a class (the generator) inherited from XafariFileReportGenerator<TDataSource, TParameters>, in addition to the basic Xafari reports infrastructure. In so doing, the data source class and the report parameter class are used as generic parameters. It is required to implement abstract method GenerateCore() in the generator class code. The method can create any number of data streams (method GetStream), to which the required report data are sent. It is necessary to register the developed generator class in the reports system by calling ObjectSpace.RegisterFileReportTemplate<TReport, TFileReportGenerator>();
The registration is performed in a method of class UpdateDatabaseAfterUpdateSchema(), which is an updater to the module in which the generator is implemented. Upon registration the developed electronic report will appear in the template list for the report specified in the Xafari registration method. When the electronic report is executed, a zip-archive containing all data streams as files is loaded to the client's local machine, the file names match the names of the steams passed to method GetStream.
The name of the zip-archive is specified in field TemplateFileName of electronic report template ITemplateFileReport. ObjectFormatter is used when generating the file name for the archive. Fields Parameters and DataSource are available in the formatter, allowing to specify the report parameters and the data source for the report, respectively.

Excel reports of the Xafari reports system have been improved

  • Excel reports have been implemented as modules:
Xafari.Reports.Excel
Xafari.Reports.Excel.Web
Xafari.Reports.Excel.Win
Xafari.Excel.Template
Xafari.Excel.Template.Win
  • In order to use Excel reports, it is necessary to add the following modules to the application:
  • Platform-independent: Xafari.Reports.Excel, Xafari.Excel.Template;
  • Modules for Windows-version: Xafari.Reports.Excel.Win, Xafari.Excel.Template.Win;
  • Modules for Web-version: Xafari.Reports.Excel.WebThe following functions are available in the Windows-version of the application:
  • Editing the template of the Excel report using Microsoft Office Excel
  • Previewing the Excel using Microsoft Office Excel
  • The following functions are available in the Web-version of the application:
    • Previewing the Excel report by means of component ASPxSpreadSheet;
    • Downloading the Excel report file to the client's local machine using the standard browser functionality.

In the Web-version of the application, by default, the report templates are stored in folder ~App_DataExcelTemplates of the web-server, also folder ~App_DataExcelReports must exist in the web-server and must be accessible for writing.
To change the path to the default folders, you need to redefine controller WebExcelReportExecuterController in the application, with redefined methods CreateReport and PreviewReport, with properly configured fields ExcelReportsPath and ExcelTemplatesPath for the instance of class WebExcelReportExecuter.

Actions 'Reprt types' and 'Report list' have been moved to category 'Hidden'

Actions 'Report types' (SimpleAction saListReport) and 'Report list' (SimpleAction saListParameters) have been moved to category 'Hidden'. It means that they do not appear in the application toolbar by default. If you want to display these actions in the application, then you need to add them in the form of ARM element 'action' or to move them to the required category by means of the model configuration. The specified actions are implemented in module Xafari.Reports.

New ARM element (ArmItemReport) has been implemented

A possibility to add a specific report to the ARMs has been added to the Xafari report system. A new ARM element type, ArmItemReport (Xafari Report), has been developed for this purpose. The functionality is implemented as a separate module Xafari.Reports.Arm.
The report is presented in the hierarchical form:

[Report] +- Edit…
+- Parameter set 1
+- Parameter set 2
where the report is the root node, and the child nodes represent the available sets of parameters for the respective report. In order to produce the report, it is necessary to select the required child node.
A view of the report configuration appears, when node 'Edit' is selected.
If no parameter sets were specified for the report, then the report is represented by a root node only in the ARMs. When the node is selected, a view of the reports configuration appears.

The longtime operation logging mechanism has been redesigned

The logging of longtime operations is performed in a separate stream.

AdvancedBandedListEditor for the Win platform has been added

  • AdvancedBandedListEditor has been ported from Ranet.XF, where it has name AdvBandedListEditor.
  • An example has been added to the FeatureCenter. The editor provides the possibility to group columns for list forms. The column groups can be configured directly in the code or in the model designer. To configure it in the code, it is necessary that the class inherits interface Xafari.IAdvBanded. Attribute 'Band' must be configured for each property that is a member of the group. The value of the attribute for an object can be determined in the code by means of CustomAttribute: [CustomAttribute("Band", "BandId")]. The value of 'BandId' specifies the ID of the group, to which the property marked with the attribute must belong. If you execute command Add Band from the context menu for node Bands, the group will be added to the model. It is possible to add any number of rows for each group using command Add Row from the context menu. It is possible to add any number of columns for each group using command Add Column from the context menu.

Common data

  • Subdivision has been added to new common data, and fields have been added for the Employee from the Person, for compatibility.

Logging

  • Methods for work with terms have been added
  • Class DomainLogicBase has been modified

Exporting to an xml file using the Atlantis application format

  • Export to XML using the Atlantis application format has been implemented. All mapping settings and export commands remain the same. XML files are generated in the course of export in compliance with the name in the TableName parameter.

Restriction of values in the list form

  • A possibility to restrict values in the list form in the editing mode has been added.
  • Editors WinLongPropertyEditor, WinIntegerPropertyEditor, WinFloatPropertyEditor, WinDoublePropertyEditor, WinDecimalPropertyEditor, WinBytePropertyEditor have been renamed to XafariLongPropertyEditor, XafariIntegerPropertyEditor, XafariFloatPropertyEditor, XafariDoublePropertyEditor, XafariDecimalPropertyEditor, XafariBytePropertyEditor, respectively.

External module connection with subscription to events

  • A mechanism for connecting event processors from an external module, that come into action in the course of import, has been implemented.

Deserializing the mapping configuration

  • It is possible to leave out the TableName tag in the mapping scheme; then the input data will for the respective type not be loaded from the data source. However, the mapping structure for the type will be loaded to the scheme.

An error related to access to rights for the action was rectified

  • Method XafariSecuritySystem.Setup has become outdated.
  • Use XafariModule.Application.Mode to get the list of actions instead.

Additional improvements

  • Method BreakLinksToControl is called when changing the current View
  • Template support functionality has been added
  • The mechanism for getting the user settings for DatabaseUserSettingsStore has been corrected
  • Operation of numerators CustomNumerator has been corrected
  • AdvancedBandedListEditor for the Win platform has been added
  • Editors Xafari.Editors.Win.XafariDatePropertyEditor and ASPxXafariDateTimePropertyEditor, offering the possibility to enter the value without entering the separator, have been added
  • Text of control MultipleLookup is updated when updating the View
  • Updating the longtime operation form in the course of quick execution
  • Operation of XafariLookupEditor with an empty field value has been corrected
  • At the start of the Web-version of the application, the main page of the application is displayed after the workplace selection (after the login procedure)
  • Assembly EntityAssembly is saved to the disc and is updated no sooner than necessary
  • An error in the numerators, when the template was inserted instead of the number, has been corrected
  • Specific size values for the control have been removed
  • An example of the reaction to the change of the link to the model has been added (to applications FeatureCenter and Northwind.DC).