Draft; Still incomplete, but hopefully a bit useful nonetheless.
This page describes how to work with the infusion Preferences Framework using schemas and the builder. It does NOT describe using the alternative technique, grades.
Preferences Editors are constructed by combining three main parts:
- panels containing controls for users to adjust a preference setting;
- a data store providing persistence for the user's selections; and
- enactors that respond to a user's settings.
The Preferences Framework provides all the lifecycle events, configuration hooks, and persistence infrastructure required to support hooking these pieces together, as well as providing some pre-existing panels and enactors that can be re-used if desired.
There are two main ways you will likely use the Preferences Framework:
- to add a Preferences Editor to a page
- In addition to the user interface for adjusting preferences, this mode will also add the data store and the enactors to the page.
- or to add only the data store and enactors to a page
- This mode allows a page to be responsive to saved preferences, even if there is no Preferences Editor on the page.
The configuration is the same for both of these modes; only the actual instantiation differs. This tutorial will teach both modes.
General process for creating a preferences editor
- Create a primary schema defining your preferences.
- Create panel components for your adjustors.
- Create enactor components to act on the preferences.
- Create an auxiliary schema specifying which panels and enactors to associate with the preferences.
- the preferences editor, along with the settings store and enhancer, or
- only the settings store and enhancer
- Style the Preferences Editor