Orbeon Forms
  • Getting started
  • Installation
    • Logging
    • Configuration banner
    • Docker
    • Azure
    • Tomcat
    • WildFly
    • WebSphere
    • WebLogic
    • GlassFish
    • Caches
    • Replication
    • Upgrading
  • Configuration
    • Properties
      • General
        • HTTP client
      • Form Runner
        • Detail page
          • Attachments
          • Email properties
          • PDF
          • Table of contents
        • Persistence
        • Summary page
      • Form Builder
      • XForms
    • Advanced
      • Workflows
      • Session management
      • State handling
      • Client-side error handling
      • Clustering and High Availability
      • Configuring a Form Runner eXist database
      • Creating a production WAR
      • Environments
      • JavaScript and CSS assets
      • Limiter filter
      • Run modes
      • Security
        • Content-Security-Policy header
      • SAP Hybris Module
      • XForms logging
    • Troubleshooting
      • Troubleshooting with the orbeon.log
      • Memory and threads
      • Relational database logging
      • Misc
  • Form Builder
    • Form settings
      • Time window
    • Form editor
      • Form area
      • Toolbox
      • Buttons bar
      • Control settings
      • Dependent fields and sections
      • Validation
      • Choices editor
      • Publishing
      • Cut, copy and paste
      • Section and grid settings
      • Section settings
      • Grid settings
      • Quick control search
      • Repeat settings
      • Repeated grids
      • Undo and redo
      • Keyboard shortcuts
    • Formulas
      • Examples of formulas
      • Formulas inspector
      • Formulas console
    • Summary page
    • Form localization
    • Advanced
      • Edit source
      • Services and actions
        • HTTP services
        • Database services
        • Simple Actions
        • Action Syntax
        • Action Syntax examples
        • Synchronizing repeated content
      • Testing a form in web mode
      • Testing PDF production
      • Testing offline functionality
      • Email Settings dialog
      • Field-level encryption
      • Messages
      • Section templates
      • Template syntax
      • XML Schemas support
      • Extensibility
        • Extension API
        • Integration
        • Toolbox component metadata
  • Form Runner
    • Overview
      • Terminology
    • Pages
      • Landing page
      • Published Forms page
      • Forms Admin page
      • Summary page
    • Components
      • Alert dialog
      • Attachment
      • Autocomplete
      • Captcha
      • Character counter
      • Checkbox input
      • Currency
      • Date
      • Dropdown date
      • Static and dynamic dropdown
      • Error summary
      • Grid
      • Handwritten signature
      • Hidden field
      • Image
      • Image annotation
      • Image attachment
      • Number
      • Open selection
      • Repeater
      • Formatted Text / Rich Text Editor
      • Section
      • Single-selection tree
      • Source code editor
      • Time
      • US phone
      • US state
      • Video
      • Video attachment
      • Wizard
      • XForms inspector
      • Yes/No answer
    • Features
      • Automatic calculations dependencies
      • Datasets
      • Excel and XML import
      • Excel and XML export
      • Summary page Excel Export
      • Form definitions and form data Zip Export
      • Purging historical data
      • Lease
      • Localization
      • Supported languages
      • Mobile support
      • Multitenancy
      • Form Runner navigation bar
      • PDF production
        • Automatic PDF
        • Automatic PDF header and footer configuration
        • PDF templates
      • Responsive design
      • Revision history
      • S3 storage
      • Simple data migration
      • TIFF production
      • Versioning
      • Wizard view
      • Workflow stage
    • Persistence
      • Using a relational database
      • Relational database schema
      • Purging old data using SQL
      • Auditing
      • Autosave
      • Database support
      • Flat view
    • Linking and embedding
      • Linking
      • Java Embedding API
      • JavaScript Embedding API
      • Liferay full portlet
      • Liferay proxy portlet
      • Securing Form Runner access
      • Form Runner offline embedding API
      • Angular component
      • React component
    • Access control and permissions
      • Users
      • Login & Logout
      • Deployed forms
      • Form fields
      • Editing forms
      • Owner and group member
      • Organizations
      • Scenarios
      • Token-based permissions
    • Styling
      • CSS
      • Grids CSS
      • Automatic PDF styling and CSS
    • APIs
      • Authentication of server-side service APIs
      • Persistence API
        • CRUD API
        • Search API
        • List form data attachments API
        • Form Metadata API
        • Lease API
        • Reindexing API
        • Caching
        • Versioning
        • Revision History API
        • Zip Export API
        • Custom persistence providers
      • Other APIs
        • Connection context API
        • Duplicate form data API
        • File scan API
        • Form Runner JavaScript API
        • Generate XML Schema API
        • PDF API
        • Publish form definition API
        • Run form in the background API
      • Data formats
        • Form data
        • Date and time
        • Form definition
    • Architecture and integration
      • Architecture
      • Access form data
      • Integration
    • Advanced
      • Buttons and processes
        • Simple process syntax
        • Core actions
        • Form Runner actions
          • Save action
          • Send action
          • Email action
        • XForms actions
        • Predefined buttons, processes and dialogs
        • Summary page buttons and processes
      • Custom dialogs/model logic
      • Services
      • Singleton form
      • Monitoring HTTP requests
  • XForms
    • Core
      • Attribute Value Templates (AVTs)
      • Binds
      • Validation
      • Variables
      • Keyboard focus
      • XForms JavaScript API
      • Error handling
        • Detailed behavior
      • Model-Bind variables
      • XForms 2.0 support
    • Events
      • Standard support
      • UI refresh events
      • Keyboard events
      • Extension events
      • Extension context information
      • Other event extensions
    • Actions
      • Repeat, insert and delete
      • Scripting actions
      • Extensions
    • Controls
      • Label, hint, help
      • Input
      • Output
      • Text area
      • Button
      • Upload
      • Dialog
    • Submission
      • Standard support
      • JSON support
      • Asynchronous submissions
      • Caching extension
      • Other submission extensions
    • XPath
      • Type annotations
      • Expression analysis
      • Tips
      • Compatibility
      • Standard functions
      • Maps and arrays Functions
      • Extension functions
        • Core functions
        • Utility functions
        • Model functions
        • Controls functions
        • XML functions
        • JSON functions
        • HTTP functions
        • Form Runner functions
        • Other functions
        • Deprecated functions
    • XBL components
      • FAQ
      • Guide
        • XBL Tutorial
        • Bindings
        • XForms models
        • Including content
        • Event handling
        • Conventions
        • Map XBL example
        • Learning from existing components
      • Advanced topics
        • XBL Modes
        • JavaScript companion classes
        • XBL library
        • Extensions
        • Attachment controls
    • XForms tutorial
      • Introduction
      • Installation
      • The Hello application
      • The Bookcast application
        • The basic app
        • Database access
        • Polishing the app
        • Adding a feed
    • Using XForms from Java apps
  • XML Platform
    • Page Flow Controller
      • Basics
      • XML submission
      • Navigating between pages
      • Paths and matchers
      • Other configuration elements
      • Typical combinations of page model and page view
      • Examples
      • Authorizing pages and services
    • Processors
      • URL generator
      • Request generator
      • PDF to image converter
    • Resources
      • Resource managers
      • Setting up an external resources directory
    • Other
      • Binary and text documents
  • FAQ
    • Licensing
    • PE and Dev Support
    • Form Builder and Form Runner
    • Resources and support
    • Other technical questions
  • Contributors
    • Automated tests
    • Building Orbeon Forms
    • Localizing Orbeon Forms
    • Validation functions
    • Contributor License Agreement
  • Release notes
    • Orbeon Forms 2022.1.9
    • Orbeon Forms 2024.1.1
    • Orbeon Forms 2023.1.7
    • Orbeon Forms 2024.1
    • Orbeon Forms 2023.1.6
    • Orbeon Forms 2023.1.5
    • Orbeon Forms 2021.1.11
    • Orbeon Forms 2022.1.8
    • Orbeon Forms 2023.1.4
    • Orbeon Forms 2023.1.3
    • Orbeon Forms 2023.1.2
    • Orbeon Forms 2022.1.7
    • Orbeon Forms 2023.1.1
    • Orbeon Forms 2023.1
    • Orbeon Forms 2022.1.6
    • Orbeon Forms 2021.1.10
    • Orbeon Forms 2022.1.5
    • Orbeon Forms 2021.1.9
    • Orbeon Forms 2022.1.4
    • Orbeon Forms 2022.1.3
    • Orbeon Forms 2021.1.8
    • Orbeon Forms 2022.1.2
    • Orbeon Forms 2022.1.1
    • Orbeon Forms 2022.1
    • Orbeon Forms 2021.1.7
    • Orbeon Forms 2021.1.6
    • Orbeon Forms 2021.1.5
    • Orbeon Forms 2021.1.4
    • Orbeon Forms 2021.1.3
    • Orbeon Forms 2021.1.2
    • Orbeon Forms 2021.1.1
    • Orbeon Forms 2021.1
    • Orbeon Forms 2020.1.6
    • Orbeon Forms 2019.2.4
    • Orbeon Forms 2019.1.2
    • Orbeon Forms 2018.2.5
    • Orbeon Forms 2018.1.4
    • Orbeon Forms 2020.1.5
    • Orbeon Forms 2020.1.4
    • Orbeon Forms 2020.1.3
    • Orbeon Forms 2020.1.2
    • Orbeon Forms 2019.2.3
    • Orbeon Forms 2020.1.1
    • Orbeon Forms 2020.1
    • Orbeon Forms 2019.2.2
    • Orbeon Forms 2019.2.1
    • Orbeon Forms 2019.1.1
    • Orbeon Forms 2019.2
    • Orbeon Forms 2019.1
    • Orbeon Forms 2018.2.4
  • Release history
  • Use cases
  • Product roadmap
  • Index of features
Powered by GitBook
On this page
  • Introduction
  • What are refresh events?
  • Purpose of refresh events
  • Lifecycle of a control
  • Markup and concrete controls
  • Controls state
  • Control creation
  • Control destruction
  • Changes during the lifetime of the control
  • Compatibility note: UI refresh events in XForms 1.1
  • See also
  1. XForms
  2. Events

UI refresh events

Introduction

What are refresh events?

We call refresh events the following UI events defined in XForms, as they can occur during UI refresh:

  • xforms-value-changed

  • xforms-enabled / xforms-disabled

  • xforms-readwrite / xforms-readonly

  • xforms-optional / xforms-required

  • xforms-valid / xforms-invalid

There are other UI events that are dispatched outside of refresh, including DOMActivate, xforms-select, etc. These are not considered here.

Purpose of refresh events

Refresh events allow:

  • reliably tracking a control's MIP status during its lifecycle

  • reliably tracking changes to the control's value as seen by the control/user

Lifecycle of a control

Markup and concrete controls

We make a distinction between:

  • XForms markup designed to represent a control, such as <xf:input>.

  • concrete controls in the sense of runtime objects able to keep state.

XForms markup for controls may or may not yield the creation of concrete controls, depending on repeats and relevance conditions.

A concrete control has a simple lifecycle:

  • It is created.

  • While in existence, it might keep and modify state information.

  • It may be destroyed.

After being destroyed:

  • A concrete control is considered non-existent.

  • Therefore it does not keep or modify internal state.

A control is concrete if it meets the conditions for relevance:

  • It has no binding attribute and is at the top-level or within a relevant container control

  • It has a binding attribute

    • AND it is at the top-level OR within a relevant container control

    • AND the binding attribute resolves to a non-empty node-set

    • AND

      • for single-node bindings, the first node of the binding has the relevant property

      • for items-set bindings, at least one node of the binding has the relevant property

Concrete controls are created at the following times:

  • when a new repeat iteration is inserted into a repeat container, if they meet the conditions for relevance

    • either during xf:insert processing

    • or during refresh

  • during refresh, when the condition for relevance goes from non-relevant to relevant

Concrete controls are destroyed at the following times:

  • when a repeat iteration is removed from a repeat container

    • or during refresh

  • during refresh, when the condition for relevance goes from relevant to non-relevant

NOTE: If the binding of a control changes from one node to another during refresh, the control is not destroyed.

Controls state

Controls maintain their own state, including value and MIP state.

Control creation

Just after a control becomes relevant, whether during:

  • initial UI creation

  • creation of a new repeat iteration

  • subsequent change from non-relevant to relevant due to node bindings, MIPs, or enclosing control relevance during refresh

The following occurs:

  • The control's state, including value and MIPs, is acquired through its binding and other attributes.

  • xforms-enabled is dispatched

  • xxforms-visible is dispatched if the control is not in a hidden switch case

    • SINCE Orbeon Forms 2018.1

  • non-default MIP events are dispatched (in order to reduce the number of events dispatched)

    • xforms-invalid

    • xforms-required

    • xforms-readonly

NOTE: a good rationale can be made for not dispatching non-default MIP events:

  • If they are considered change events, then they should behave like xforms-value-changed.

  • Context information upon xforms-enabled can be used to determine the initial state of the MIPs.

NOTE: xforms-value-changed is NOT dispatched (because there is no "value change").

Control destruction

Just before a control becomes non-relevant, whether during:

  • destruction of a repeat iteration

  • subsequent change from relevant to non-relevant due to node bindings, MIPs, or enclosing control relevance during refresh

The following occurs:

  • xxforms-hidden is dispatched if the control is not in a hidden switch case

    • SINCE Orbeon Forms 2018.1

  • xforms-disabled is dispatched

  • no other events are dispatched

Changes during the lifetime of the control

Each relevant control stores its current value and MIP information. Therefore refresh events are related directly to controls, and no longer to instance data nodes. This is an important difference with XForms 1.1.

While the control is relevant, upon refresh:

  • Its current MIP and value are stored temporarily as the control's old state.

  • The new control state, including value and MIPs, is acquired through its binding and other attributes.

  • Old and new state are compared.

  • Events related to value and MIP changes are dispatched.

NOTES:

  • xf:output/@value also dispatches xforms-value-changed.

  • xf:var also dispatch xforms-value-changed.

NOTE: XForms 1.1 says that all MIP events must be dispatched upon value change. This is not not necessary because those events are properly tracked independently.

Compatibility note: UI refresh events in XForms 1.1

Refresh events in XForms 1.1 are based on:

  • marking instance data nodes as their value change or binds apply to them

  • checking those markings during refresh

  • dispatching events based on that check

See also

PreviousStandard supportNextKeyboard events

Last updated 2 years ago

during processing of the default action for event, if they meet the conditions for relevance

either during xf:delete processing [UNTIL Orbeon Forms 2017.2 included, see ]

See also .

See also .

This mechanism is not satisfying because we think that it goes against the expectations of the form author and it does not produce events reliably (). Therefore Orbeon Forms does not strictly follow XForms 1.1 on this topic.

xforms-model-construct-done
#3503
xxforms-visible
xxforms-hidden
see email sent to public-forms mailing-list on June 12, 2007
Standard support
Keyboard events
Extension events
Extension context information
Other event extensions