Skip to content
apobekiaris edited this page Jun 6, 2020 · 20 revisions

GitHub issues GitHub close issues

About

With the help of the ViewItemValue XAF modules end-users can configure the default values for lookup view items.

Details


Credits: to the Company (wants anonymity) that sponsor the initial implementation of this module.


This is a platform agnostic module. The end-user can execute the ViewItemValue action and select which value a lookup property editor will get when a new object is created. To configure the participating DetailView and lookup members you can use the Model Editor as in the next image:

image

When the above Order_DetailView created the ViewItemValue will be active and will contain two items the Product and the Accessory. Executing the action will result in saving the related lookup editor object key value along with the view and member name in the database. When the same Order_DetailView is created later for a new object then the info from the database will be used to assign the appropriate object.

Below is a screencast of the module in action. At the bottom you can see what the Reactive.Logger.Client.Win reports in our dev environment as the module is used in a remote IIS. kMok40PDFn


Possible future improvements:

  1. Multiple default object info persistent with one go.
  2. ListView support.
  3. Remember value strategies e.g Last.
  4. Conditional strategies.
  5. Scripting strategies.
  6. Support for any member type.
  7. Any other need you may have.

Let me know if you want me to implement them for you.


Installation

  1. First you need the nuget package so issue this command to the VS Nuget package console

    Install-Package Xpand.XAF.Modules.ViewItemValue.

    The above only references the dependencies and next steps are mandatory.

  2. Ways to Register a Module or simply add the next call to your module constructor

    RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.ViewItemValueModule));

Versioning

The module is not bound to DevExpress versioning, which means you can use the latest version with your old DevExpress projects Read more.

The module follows the Nuget Version Basics.

Dependencies

.NetFramework: net461

DevExpress.ExpressApp Any
DevExpress.ExpressApp.Validation Any
DevExpress.Xpo Any
Fasterflect.Xpand 2.0.7
JetBrains.Annotations 2020.1.0
System.Interactive 4.0.0
System.Reactive 4.3.2
System.ValueTuple 4.5.0
Xpand.Extensions 2.201.33
Xpand.Extensions.Reactive 2.201.34
Xpand.Extensions.XAF 2.201.34
Xpand.Extensions.XAF.Xpo 2.201.32
Xpand.XAF.Modules.Reactive 2.201.34
Xpand.VersionConverter 2.201.7

Issues-Debugging-Troubleshooting

To Step in the source code you need to enable Source Server support in your Visual Studio/Tools/Options/Debugging/Enable Source Server Support. See also How to boost your DevExpress Debugging Experience.

If the package is installed in a way that you do not have access to uninstall it, then you can unload it with the next call at the constructor of your module.

Xpand.XAF.Modules.Reactive.ReactiveModuleBase.Unload(typeof(Xpand.XAF.Modules.ViewItemValue.ViewItemValueModule))

Tests

The module is tested on Azure for each build with these tests. All Tests run as per our Compatibility Matrix

image

image


Custom badge

Star the project if you think it deserves it.

GitHub stars

Fork the project to extend and contribute.

GitHub forks

Clone this wiki locally