WireBootstrap
Home
Docs
Buy
Support
Search…
Introduction
Overview
Getting Started
Connecting to Data
Data Connectors
Data Sources
Discovery
Building a Data Connector
Working With Queries
Select Queries
Stored Procedures
Custom Web Services
Executing Queries
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
Component
Web Frameworks
Building a Component
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
Loading Assets
Service Calls
Download Files
Browser Location
Types
Reference
wire
wire.data
wire.data.DataEvent
wire.data.DataModel
wire.data.DataPromise
wire.data.DataSet
wire.data.DataSource
wire.data.DataTable
wire.data.StoredProcedure
wire.data.TableQuery
wire.ui
Powered By
GitBook
wire.data.DataPromise
Methods
Use the following methods on data promises.
Name
Description
resolve(data)
Resolves a promise as successful and returns the
data
.
reject
Rejects a promise.
Events
Use the following callbacks when working with data promises.
Name
Description
always
Called when a promise is either resolved or rejected.
done
Called when a promise is resolved.
fail
Called when a promise is rejected.
processing
Called when a promise is pending an update.
1
const
promise
=
new
wire
.
data
.
DataPromise
();
2
​
3
promise
4
.
done
(
(
data
)
=>
{
5
// data is avaialble
6
})
7
.
processing
(
()
=>
{
8
// new query is running
9
})
10
.
fail
(
(
ex
)
=>
{
11
// processing failed
12
// do something with the exception object
13
})
14
.
always
(
()
=>
{
15
// all done whether fail or success
16
// clean up
17
});
Copied!
Previous
wire.data.DataModel
Next
wire.data.DataSet
Last modified
1yr ago
Copy link
Contents
Methods
Events