Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dijit/form/_FormSelectWidget.js

  • Provides:

    • dijit.form._FormSelectWidget
  • Requires:

    • dijit.form._FormWidget in common
    • dojo.data.util.sorter in common
  • dijit.form._FormSelectWidget

    • type
      Function
    • chains:
      • dijit.form._FormValueWidget: (prototype)
      • dijit.form._FormValueWidget: (call)
    • parameters:
      • keywordArgs: (typeof Object)
    • summary
      Extends _FormValueWidget in order to provide "select-specific"
      values - i.e., those values that are unique to <select> elements.
      This also provides the mechanism for reading the elements from
      a store, if desired.
  • 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

    • 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
    • returns
      dijit.form.__SelectOption[]|dijit.form.__SelectOption|null
    • summary
      Returns a given option (or options).
    • return_summary
      The option corresponding with the given value or index.  null
      is returned if any of the following are true:
      - A string value is passed in which doesn't exist
      - An index is passed in which is outside the bounds of the array of options
      - A dijit.form.__SelectOption is passed in which is not a part of the select
    • type
      Function
  • dijit.form._FormSelectWidget.options.length

  • dijit.form._FormSelectWidget.addOption

    • parameters:
      • option: (typeof dijit.form.__SelectOption|dijit.form.__SelectOption[])
    • summary
      Adds an option or options to the end of the select.  If value
      of the option is empty or missing, a separator is created instead.
      Passing in an array of options will yield slightly better performance
      since the children are only loaded once.
    • type
      Function
  • dijit.form._FormSelectWidget.removeOption

    • parameters:
      • valueOrIdx: (typeof String|dijit.form.__SelectOption|Number|Array)
    • summary
      Removes the given option or options.  You can remove by string
      (in which case the value is removed), number (in which case the
      index in the options array is removed), or select option (in
      which case, the select option with a matching value is removed).
      You can also pass in an array of those values for a slightly
      better performance since the children are only loaded once.
    • type
      Function
  • dijit.form._FormSelectWidget.updateOption

    • parameters:
      • newOption: (typeof dijit.form.__SelectOption|dijit.form.__SelectOption[])
    • summary
      Updates the values of the given option.  The option to update
      is matched based on the value of the entered option.  Passing
      in an array of new options will yeild better performance since
      the children will only be loaded once.
    • type
      Function
  • dijit.form._FormSelectWidget.setStore

    • parameters:
      • store: (typeof dojo.data.api.Identity)
        The store you would like to use - it MUST implement Identity,
        and MAY implement Notification.
      • selectedValue: (typeof anything)
        The value that this widget should set itself to *after* the store
        has been loaded
      • fetchArgs: (typeof Object)
        The arguments that will be passed to the store's fetch() function
    • returns
      dojo.data.api.Identity
    • summary
      Sets the store you would like to use with this select widget.
      The selected value is the value of the new store to set.  This
      function returns the original store, in case you want to reuse
      it or something.
    • type
      Function
  • dijit.form._FormSelectWidget._notifyConnections

    • type
      Array
  • dijit.form._FormSelectWidget._onChangeActive

    • type
      bool
  • dijit.form._FormSelectWidget._loadingStore

    • type
      Object
  • dijit.form._FormSelectWidget.setStore.store

    • type
      dojo.data.api.Identity
    • summary
      The store you would like to use - it MUST implement Identity,
      and MAY implement Notification.
      selectedValue: anything?
      The value that this widget should set itself to *after* the store
      has been loaded
      fetchArgs: Object?
      The arguments that will be passed to the store's fetch() function
  • dijit.form._FormSelectWidget._setValueAttr

    • parameters:
      • newValue: (typeof anything)
      • priorityChange: (typeof Boolean)
    • summary
      set the value of the widget.
      If a string is passed, then we set our value from looking it up.
    • type
      Function
  • dijit.form._FormSelectWidget._pendingValue

  • dijit.form._FormSelectWidget._getDisplayedValueAttr

    • summary
      returns the displayed value of the widget
    • type
      Function
  • dijit.form._FormSelectWidget._loadChildren

    • summary
      Loads the children represented by this widget's options.
      reset the menu to make it populatable on the next click
    • type
      Function
  • dijit.form._FormSelectWidget._updateSelection

    • summary
      Sets the "selected" class on the item for styling purposes
    • type
      Function
  • dijit.form._FormSelectWidget._getValueFromOpts

    • summary
      Returns the value of the widget by reading the options for
      the selected flag
    • type
      Function
  • dijit.form._FormSelectWidget._onNewItem

    • parameters:
      • item: (typeof item)
      • parentInfo: (typeof Object)
    • type
      Function
  • dijit.form._FormSelectWidget._onDeleteItem

    • parameters:
      • item: (typeof item)
    • type
      Function
  • dijit.form._FormSelectWidget._onSetItem

    • parameters:
      • item: (typeof item)
    • type
      Function
  • dijit.form._FormSelectWidget._getOptionObjForItem

    • parameters:
      • item
    • returns
      dijit.form.__SelectOption
    • summary
      Returns an option object based off the given item.  The "value"
      of the option item will be the identity of the item, the "label"
      of the option will be the label of the item.  If the item contains
      children, the children value of the item will be set
    • type
      Function
  • dijit.form._FormSelectWidget._addOptionForItem

    • parameters:
      • item: (typeof item)
    • summary
      Creates (and adds) the option for the given item
    • type
      Function
  • dijit.form._FormSelectWidget.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • keywordArgs: (typeof Object)
    • 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())
  • dijit.form._FormSelectWidget.buildRendering

    • type
      Function
  • dijit.form._FormSelectWidget._fillContent

    • summary
      Loads our options and sets up our dropdown correctly.  We
      don't want any content, so we don't call any inherit chain
      function.
    • type
      Function
  • dijit.form._FormSelectWidget.postCreate

    • summary
      sets up our event handling that we need for functioning
      as a select
    • type
      Function
  • dijit.form._FormSelectWidget.startup

    • summary
      Connects in our store, if we have one defined
    • type
      Function
  • dijit.form._FormSelectWidget.destroy

    • summary
      Clean up our connections
    • type
      Function
  • dijit.form._FormSelectWidget._addOptionItem

    • parameters:
      • option: (typeof dijit.form.__SelectOption)
    • summary
      User-overridable function which, for the given option, adds an
      item to the select.  If the option doesn't have a value, then a
      separator is added in that place.  Make sure to store the option
      in the created option widget.
    • type
      Function
  • dijit.form._FormSelectWidget._removeOptionItem

    • parameters:
      • option: (typeof dijit.form.__SelectOption)
    • summary
      User-overridable function which, for the given option, removes
      its item from the select.
    • type
      Function
  • dijit.form._FormSelectWidget._setDisplay

    • parameters:
      • newDisplay: (typeof String)
        or String[]
    • summary
      Overridable function which will set the display for the
      widget.  newDisplay is either a string (in the case of
      single selects) or array of strings (in the case of multi-selects)
    • type
      Function
  • dijit.form._FormSelectWidget._getChildren

    • summary
      Overridable function to return the children that this widget contains.
    • type
      Function
  • dijit.form._FormSelectWidget._getSelectedOptionsAttr

    • summary
      hooks into this.attr to provide a mechanism for getting the
      option items for the current value of the widget.
    • type
      Function
  • dijit.form._FormSelectWidget._pseudoLoadChildren

    • parameters:
      • items: (typeof item[])
        An array of items that will be loaded, when needed
    • summary
      a function that will "fake" loading children, if needed, and
      if we have set to not load children until the widget opens.
    • type
      Function
  • dijit.form._FormSelectWidget.onSetStore

    • summary
      a function that can be connected to in order to receive a
      notification that the store has finished loading and all options
      from that store are available
    • type
      Function
  • dijit.form._FormSelectWidget._oValue

    • type
      Object
  • dijit.form.__SelectOption

    • type
      Function
  • dijit.form.__SelectOption.value

    • type
      String
    • summary
      The value of the option.  Setting to empty (or missing) will
      place a separator at that location
  • dijit.form.__SelectOption.label

    • type
      String
    • summary
      The label for our option.  It can contain html tags.
  • dijit.form.__SelectOption.selected

    • type
      Boolean
    • summary
      Whether or not we are a selected option
  • dijit.form.__SelectOption.disabled

    • type
      Boolean
    • summary
      Whether or not this specific option is disabled
  • dijit.form

    • type
      Object
  • dijit

    • type
      Object