xaf-nonpersistent

Render XAF UI for non-persistent objects via NonPersistentObjectSpace and AddNonPersistent registration.

6|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/kashiash/xaf-skills --skill xaf-nonpersistent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xaf-nonpersistent
Source: https://github.com/kashiash/xaf-skills/tree/main/xaf-nonpersistent
Command: npx skills add https://github.com/kashiash/xaf-skills --skill xaf-nonpersistent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Non-persistent objects are business classes for which XAF generates full UI (List Views, Detail Views, Actions) but which are not mapped to any database table. They are ideal for data loaded from external sources, computed at runtime, or used as temporary input forms.

Core Features & Use Cases

  • Decorated with [DomainComponent] attribute (NOT [NonPersistent] from XPO — different meaning!)
  • Do NOT inherit from XPO persistent base classes (causes SessionMixingException)
  • Managed by NonPersistentObjectSpace
  • Must register .AddNonPersistent() in app builder
  • Supports ObjectsGetting and ObjectByKeyGetting events to populate lists and single items
  • PopupWindowShowAction dialogs for user input

Quick Start

Register AddNonPersistent after persistent providers and declare your types with [DomainComponent] to enable non-persistent objects.

Frequently Asked Questions about xaf-nonpersistent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create non-persistent objects in XAF that still generate UI?

To create non-persistent objects in XAF, decorate classes with the [DomainComponent] attribute and inherit from NonPersistentBaseObject. You must also register them using the AddNonPersistent() method in the application builder to generate UI for non-persistent objects.

Why does my XAF non-persistent object throw a SessionMixingException?

A SessionMixingException occurs when non-persistent objects inherit from XPO persistent base classes. To fix this, ensure your non-persistent objects do not inherit from persistent base classes and use the [DomainComponent] attribute instead of the [NonPersistent] attribute.

What is the difference between [DomainComponent] and [NonPersistent] attributes in XAF?

In XAF, the [DomainComponent] attribute enables non-persistent objects with full UI generation, while the [NonPersistent] attribute from XPO has a different meaning and should not be used for this purpose. Using the wrong attribute prevents the framework from managing your temporary data correctly.

How do I populate a NonPersistentObjectSpace with external data in XAF?

To populate a NonPersistentObjectSpace with external data, handle the ObjectsGetting event to populate lists and the ObjectByKeyGetting event to populate single items. This approach allows you to load computed views or external data dynamically into XAF List and Detail views.

Can I use PopupWindowShowAction dialogs for temporary input forms in XAF?

Yes, you can use PopupWindowShowAction dialogs to build temporary input forms in XAF. By combining these dialogs with non-persistent objects managed by a NonPersistentObjectSpace, you can capture user input without storing the underlying data in a database table.

When should I use non-persistent objects instead of persistent database tables in XAF?

Use non-persistent objects in XAF when dealing with data loaded from external sources, computed at runtime, or used as temporary input forms. They generate full UI including List Views, Detail Views, and Actions without mapping to any database table, ideal for dynamic read-only or transient data.