wire.ui.Component
Last updated
Last updated
Although it is not required that a component extend the wire.ui.Component
class in order to work inside a WireBootstrap application, the wire.ui.Component
class contains all the core functionality needed by a component to take advantage of the data binding, messaging, configuration, events, and other functionality provided the WireBootstrap framework.
Individuals working with WireBootstrap components to build applications are referred to as component consumers. For this audience, a subset of the methods in wire.ui.Component
will be applicable. For an overview, read Working with Components.
Component authors are those who are building new components for WireBootstrap that will eventually be used by component consumers. For component authors, many more of the features of this base class will be applicable. For details, read Building a WireBootstrap Component.
Name
Description
config
Returns the configuration object for the component after initialization. This will be the combination of the configuration passed into the method merged with the defaults defined for the component. Any component defaults will be overridden with user-defined configured passed into .
data
Returns the internal data to which the component is bound.
dataBind(callback)
Defines the component's data-bind callback
function. For component authors, this is called anytime a component should update its UI based on a change in the data to which it is bound. For component consumers, this will in-turn call the event if one is configured. Visit for details.
element
Returns the native DOM element for the component. Use $element
to return the jQuery version of the element if the component uses jQuery.
fail(exception)
Callback function for a failure during a lifecycle event. See for additional information.
initialize(config)
Binds the configuration data in config
to the component. This includes merging configuration settings with the component defaults, making any calls to data services for data, binding the UI to data, setting up the , and listening for data changes. This method is normally called by component authors in the render
plugin(plugin)
For components that use or many times just wrap internal jQuery components. This method will set or return the instance of the internal jQuery component.
ready
Callback function for when the component has finished initializing. See for additional information.
select
Component consumers are able to specify a list of fields to be displayed in a table component in a configuration option in a number of ways. This method can be used by component authors to read that list of fields.
spinner
A boolean
that tells the component to automatically use a spinner when refreshing its UI. This includes getting or changing data. This value defaults to true
. See for details.