dijit/form/_FormSelectWidget.js

  • Provides:

    • dijit.form._FormSelectWidget
  • dijit.form._FormSelectWidget

    • type
      Function
    • chains:
      • dijit.form._FormValueWidget: (prototype)
      • dijit.form._FormValueWidget: (call)
    • summary
      Saves off our value, if we have an initial one set so we
      can use it if we have a store as well (see startup())
    • parameters:
      • keywordArgs: (typeof Object)
    • source: [view]
        this._oValue = (keywordArgs || {}).value || null;
  • dijit.form._FormSelectWidget.multiple

    • tags: const
    • type
      Boolean
    • summary
      Whether or not we are multi-valued
  • dijit.form._FormSelectWidget.options

    • type
      dijit.form.__SelectOption[
    • summary
      The set of options for our select item.  Roughly corresponds to
      the html <option> tag.
  • dijit.form._FormSelectWidget.store

    • type
      dojo.data.api.Identity
    • summary
      A store which, at the very least impelements dojo.data.api.Identity
      to use for getting our list of options - rather than reading them
      from the <option> html tags.
  • dijit.form._FormSelectWidget.query

    • type
      object
    • summary
      A query to use when fetching items from our store
  • dijit.form._FormSelectWidget.queryOptions

    • type
      object
    • summary
      Query options to use when fetching from the store
  • dijit.form._FormSelectWidget.onFetch

    • type
      Function
    • summary
      A callback to do with an onFetch - but before any items are actually
      iterated over (i.e. to filter even futher what you want to add)
  • dijit.form._FormSelectWidget.sortByLabel

    • type
      Boolean
    • summary
      Flag to sort the options returned from a store by the label of
      the store.
  • dijit.form._FormSelectWidget.loadChildrenOnOpen

    • type
      Boolean
    • summary
      By default loadChildren is called when the items are fetched from the
      store.  This property allows delaying loadChildren (and the creation
      of the options/menuitems) until the user clicks the button to open the
      dropdown.
  • dijit.form._FormSelectWidget.getOptions

    • type
      Function
    • parameters:
      • valueOrIdx: (typeof anything)
        If passed in as a string, that string is used to look up the option
        in the array of options - based on the value property.
        (See dijit.form.__SelectOption).
        
        If passed in a number, then the option with the given index (0-based)
        within this select will be returned.
        
        If passed in a dijit.form.__SelectOption, the same option will be
        returned if and only if it exists within this select.
        
        If passed an array, then an array will be returned with each element
        in the array being looked up.
        
        If not passed a value, then all options will be returned
    • source: [view]
      define("dijit/form/_FormSelectWidget", ["dojo", "dijit", "dijit/form/_FormWidget", "dojo/data/util/sorter"], function(dojo, dijit) {




      dijit.form.__SelectOption = function(){
       // value: String
       //  The value of the option. Setting to empty (or missing) will
       //  place a separator at that location
       // label: String
       //  The label for our option. It can contain html tags.
       // selected: Boolean
       //  Whether or not we are a selected option
       // disabled: Boolean
       //  Whether or not this specific option is disabled
       this.value = value;
       this.label = label;
       this.selected = selected;
       this.disabled = disabled;
      }




      dojo.declare("dijit.form._FormSelectWidget", dijit.form._FormValueWidget, {
       // summary:
       //  Extends _FormValueWidget in order to provide "select-specific"
       //  values - i.e., those values that are unique to