Documentation

ui.proto

The very base class for UI components.

The class defines properties, methods, and events related to loading and rendering data. Can serves as the base class while creating custom multi-item components. Not intended for direct initialization.

Constructor

    var proto = webix.ui({
        view:"proto", 
        container:"mydiv", 
        ...config options goes here..
    })
    //or, in case of jQuery
    $("#mydiv").webix_proto({
        ...config options goes here..
    });
Methods
add adds an item to the store
addCss applied CSS class to a component item
adjust adjusts the component to the size of the parent HTML container
attachEvent attaches the handler to an inner event of the component (allows behaviour customizations)
bind binds components
blockEvent temporarily blocks triggering of ALL events of the calling object
callEvent calls an inner event
clearAll removes all items from the component
clearCss removes css class from all items
clearValidation removes all validation marks from the component
count returns the number of currently visible items
customize redefines the "type" property
define redefines a single configuration property (or a hash of properties)
destructor destructs the calling object
detachEvent detaches a handler from an event (which was attached before by the attachEvent method)
disable disables the calling view (makes it dimmed and unclickable)
enable enables the calling view that was disabled by the 'disable' method
exists checks whether an item with the specified id exists
filter filters the component
getChildViews returns child views of the calling component
getFirstId returns the ID of the first item
getFormView returns master form for the input
getIdByIndex returns the id of the item with the specified index
getIndexById returns the index of the item with the specified id
getItem gets the object of the data item with the specified id
getItemNode returns html element of the item
getLastId returns the id of the last item
getNextId returns the ID of an item which is positioned the specified step after the specified item
getNode returns the main HTML container for the calling object
getPage returns the currently visible page in case of paged view
getPager returns the pager object associated with the component
getParentView returns the parent view of the component
getPrevId returns the ID of an item which is positioned the specified step before the specified item
getTopParentView returns top parent view
hasCss checks if item has specific css class
hasEvent checks whether the component has the specified event
hide hides the view
isEnabled checks whether the view is enabled
isVisible checks whether the view is visible
load loads data from an external data source.
loadNext sends a request to load the specified number of records to the end of the clientside dataset or to the specified position
locate gets the id of an item from the specified HTML event
mapEvent routes events from one object to another
parse loads data to the component from an inline data source
refresh repaints the whole view or a certain item
remove removes the specified item from datastore
removeCss removes CSS class from a component item
render renders the specified item or the whole component
resize adjusts the view to a new size
serialize serializes data to a JSON object
setPage makes the specified page visible (assuming that the pager was defined )
show makes the component visible
showItem scrolls the component to make the specified item visible
sort sorts datastore
sync allows syncing two copies of data (all or just a part of it) from one DataCollection to another
unbind breaks "bind" link
unblockEvent cancels blocking events that was enabled by the 'blockEvent' command
updateItem sets properties of the data item
validate validates one record or all dataset against validation rules
Events
onAfterAdd fires after adding item to datastore
onAfterDelete fires after item deleting
onAfterLoad fires after server side loading is complete
onAfterRender occurs immediately after the component has been rendered
onAfterScroll occurs when some webix view has been scrolled
onAfterSort fires after sorting dataset
onBeforeAdd fires before adding item to datastore
onBeforeDelete fires before item deleting
onBeforeLoad occurs immediately before data loading has been started
onBeforeRender occurs immediately before the component has been rendered
onBeforeSort fires before sorting dataset
onBindRequest fires when the component is ready to receive data from the master component
onDataRequest fires when data from the server is requested for linear data structures (List, DataTable, DataView etc.) to implement dynamic data loading
onDataUpdate fires when data item is in update process
onDestruct occurs when component destroyed
onItemRender for each item rendering, occurs only for items with custom templates
onKeyPress occurs when keyboard key is pressed for the control in focus
onLoadError fires when an error occurs during data loading ( invalid server side response )
onLongTouch fires on holding finger in some position for a certain period of time
onSwipeX occurs on a horizontal swipe movement
onSwipeY occurs on a vertical swipe movement
onTimedKeyPress fires after typing has been finished in the field
onTouchEnd occurs when the touch event is ended
onTouchMove occurs during touch movement
onTouchStart when some webix view has been touched
onValidationError fires when newly loaded/added/edited data fails to pass validation
onValidationSuccess fires after the newlyloaded/added/edited data has passes validation successfully
onViewResize view size was changed by resizer
Properties
animate defines or disables view change animation.
borderless used to hide the component borders
click sets an action happening on a button click
container an html container (or its id) where the component needs initializing
css the name of a css class that will be applied to the view container
data JavaScript array containing data for the component
dataFeed the URL that the component will use to reload data during binding
datathrottle sets the polling interval (the time period between the completion of a network request and the next request for data)
datatype the type of loaded data
disabled indicates whether an item is enabled or not
gravity sets the view gravity (1 by default)
height sets the height of the component
hidden defines whether the view will be hidden initially
id the component ID
maxHeight sets the maximum height for the view
maxWidth sets the maximum width for the view
minHeight sets the minimal height for the view
minWidth sets the minimal width for the view
on allows attaching custom handlers to inner events of the component
pager defines paging configuration ( creates a 'ui.pager' object)
ready event handler called just after the component has been completely initialized
removeMissed defines how to treat items in case of reloading
rules set of validation rules for the component
save defines URLs for data saving
scheme defines schemes for data processing
template the component template
tooltip sets a popup message appearing on pointing a mouse cursor over the dedicated item.
type object that specifies items presentation
url the URL the component will use to load data after its initialization
width sets the width of the component
Other
$getSize returns the current size of the component
$height current height of the view
$scope scope for resolving event and method names
$setSize sets the component size
$skin method, which will be called when skin defined
$view reference to top html element of the view
$width current width of the view
config all options from initial component configuration
name indicates the name of the component (a read-only property)
type set of properties and helpers for item rendering
types collection of possible types
Back to top