WireBootstrap
HomeDocsBuySupport
  • Introduction
  • Overview
  • Getting Started
  • Installation
  • Connecting to Data
    • Data Connectors
      • SQL Data
      • Custom Web Services
      • Local Data
      • Other Sources
    • Data Sources
    • Discovery
    • Building a Data Connector
  • Working With Queries
    • Select Queries
      • Query Extensions
    • Stored Procedures
    • Custom Web Services
    • Executing Queries
    • ORM
  • Writing Data
  • Updates
  • Deletes
  • Working with DataTables
    • Introduction
    • Filter and Sort
    • Select and Calculate
    • Joins
    • Rows
    • Columns
  • Working with DataSets
  • Introduction
  • Executing Queries
  • Transforms
  • Writing Data
  • Data Events
  • Working with Components
    • Introduction
    • Encapsulation
    • Configuration
      • Data
      • Events
      • Observables
      • Validation
      • Display
      • Vendor
      • Custom
    • Component
    • Web Frameworks
    • Building a Component
      • Hello World
      • Data Events
      • DataSets
  • Working With Data Events
    • Introduction
    • Event Basics
    • Event Data
    • Event Actions
  • Working with Themes
    • Introduction
    • Sample Data
    • Libraries
    • Pages
    • Building a Theme Project
  • Utilities
    • Formatting
    • Expressions
    • Collections
    • Spinners
    • Copy and Merge
    • Validation
    • Loading Assets
    • Service Calls
    • Download Files
    • Browser Location
    • Types
    • Promise
  • Reference
    • wire
      • wire.Collection
      • wire.download
      • wire.validate
    • wire.data
      • wire.data.DataEvent
      • wire.data.DataModel
      • wire.data.DataPromise
      • wire.data.DataSet
      • wire.data.DataSource
      • wire.data.DataTable
        • Columns
        • Rows
      • wire.data.StoredProcedure
      • wire.data.TableQuery
    • wire.ui
      • wire.ui.Component
      • wire.ui.validate
Powered by GitBook
On this page
  • Raising an Event
  • Listening for an Event
  • Standard Events
  • DataSelect
  • DataWrite

Was this helpful?

  1. Working With Data Events

Event Basics

Raising an Event

Providers can raise data events by creating an instance of the wire.data.DataEvent class, specifying the name of the event and then calling the raise method.

new wire.data.DataEvent("myevent").raise();

Listening for an Event

Consumers can listen for events by registering a listener as a function callback with the WireBootstrap Data Event Manager. Use the listen method on wire.data to create a new listener.

wire.data.listen().event("myevent").when((data) => {
   ...   
});

Standard Events

Methods are available on wire.data.DataEvent class for creating standard data events in the system.

DataSelect

The dataselectevent is used primarily by WireBootstrap components to let other components know when a user selects or changes data inside the component.

const dataevent = new wire.data.DataEvent().dataselect();

DataWrite

The datawriteevent is used primarily by WireBootstrap components to let other components know a user has saved data to a data service.

const dataevent = new wire.data.DataEvent().datawrite();
PreviousIntroductionNextEvent Data

Last updated 3 years ago

Was this helpful?