NI-VXI 3.5.2 is the interface software for National Instruments VXIpc embedded controllers, MXI-2 extender technology, VXI-1394 controllers, VXI-8340 series controllers, VXI-USB controllers, or VXI-8360 series controllers.
![]()
Welcome to Apache MavenApache Maven is a software project management and comprehension tool.
PlaceholdersA placeholder value can be defined and will be displayed until a selection is made:The placeholder can be declared via a data-placeholder attribute attached to the select, or via the placeholder configuration element as seen in the example code.When placeholder is used for a non-multi-value select box, it requires that you include an empty tag as your first option.Optionally, a clear button (visible once a selection is made) is available to reset the select box back to the placeholder value. Loading Remote DataSelect2 comes with AJAX/JSONP support built in. In this example we will search for repositories using Github's API:If this example stops working, you have most likely reached the usage limit for the GitHub Search API of 5 requests per minute. Please wait a few minutes and try again. Example CodeSelect2 uses jQuery's $.ajax function to execute the remote call by default. An alternative transport function can be specified in the ajax settings, or an entirely custom implementation can be built by providing a custom query function instead of using the ajax helper.
Infinite Scroll with Remote DataSelect2 supports lazy-appending of results when the result list is scrolled to the end.In order to enable the remote service must support some sort of a paging mechanism andthe query function given to Select2 must take advantage of it. The following example demonstrateshow this can be set up. Search for some keyword and then scroll the result list to the end tosee more results load:If this example stops working, you have most likely reached the usage limit for the GitHub Search API of 5 requests per minute. Please wait a few minutes and try again. Example Code. Reacting to external value changesSelect2 can react to external value changes and keep its selection in-sync.
![]()
This feature allowsSelect2 to work seamlessly with front-end frameworks that use data binding between ui componentsand model values.This feature is only available when initSelection function is provided inthe options. This function is needed to map the choice ids set on the element to objects used bySelect2. This function is set by default when Select2 is attached to a select or whenthe tags helper function is used.
ValGets or sets the selection. If the value parameter is not specified, the id attribute of the currently selected element is returned. If the value parameter is specified it will become the current selection. ParameterTypeDescriptionvalue (optional)objectSingle-ValuedMulti-ValuedAttached to selectValue of the value attribute of the option that should be selected.Array of the value attributes of the options that should be selected. Null for empty.Attached to inputtype=hiddenId of the object that should be selected. Can only be used if initSelection was specified.An array of objects ids that should be selected.
![]()
Can only be used if initSelection was specified.triggerChange (optional)booleanWhether or not a change event should be triggered. False by default.val method invoked on a single-select with an unset value will return ', while a val method invoked on an empty multi-select will return.Example: alert('Selected value is: '+$('#e8').select2('val')); $('#e8').select2('val', 'CA');Notice that in order to use this method you must define the initSelection function in the options so Select2 knows how to transform the id of the object you pass in val to the full object it needs to render selection. If you are attaching to a select element this function is already provided for you.
![]() Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |