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/NumberTextBox.js

  • Provides:

    • dijit.form.NumberTextBox
  • Requires:

    • dijit.form.ValidationTextBox in common
    • dojo.number in common
  • dijit.form.NumberTextBox.__Constraints

    • type
      Function
    • chains:
      • dijit.form.RangeBoundTextBox.__Constraints: (prototype)
      • dojo.number.__FormatOptions.prototype: (prototype)
      • dojo.number.__ParseOptions.prototype: (prototype)
      • dijit.form.RangeBoundTextBox.__Constraints: (call)
      • dojo.number.__FormatOptions: (call)
      • dojo.number.__ParseOptions: (call)
    • summary
      Specifies both the rules on valid/invalid values (minimum, maximum,
      number of required decimal places), and also formatting options for
      displaying the value when the field is not focused.
    • example
      Minimum/maximum:
      To specify a field between 0 and 120:
      		{min:0,max:120}
      To specify a field that must be an integer:
      		{fractional:false}
      To specify a field where 0 to 3 decimal places are allowed on input:
      		{places:'0,3'}
  • dijit.form.NumberTextBoxMixin

    • type
      Function
    • summary
      A mixin for all number textboxes
    • tags:
  • dijit.form.NumberTextBoxMixin.regExpGen

    • alias - dojo.number.regexp
  • dijit.form.NumberTextBoxMixin.constraints

    • type
      dijit.form.NumberTextBox.__Constraints
    • summary
      Despite the name, this parameter specifies both constraints on the input
      (including minimum/maximum allowed values) as well as
      formatting options like places (the number of digits to display after
      the decimal point).  See <code>dijit.form.NumberTextBox.__Constraints</code> for details.
  • dijit.form.NumberTextBoxMixin.value

    • alias - NaN
    • type
      Number
    • summary
      The value of this NumberTextBox as a Javascript Number (i.e., not a String).
      If the displayed value is blank, the value is NaN, and if the user types in
      an gibberish value (like &quot;hello world&quot;), the value is undefined
      (i.e. get('value') returns undefined).
      
      Symmetrically, set('value', NaN) will clear the displayed value,
      whereas set('value', undefined) will have no effect.
  • dijit.form.NumberTextBoxMixin.editOptions

    • tags:
    • type
      Object
    • summary
      Properties to mix into constraints when the value is being edited.
      This is here because we edit the number in the format &quot;12345&quot;, which is
      different than the display value (ex: &quot;12,345&quot;)
  • dijit.form.NumberTextBoxMixin.editOptions.pattern

    • type
      String
  • dijit.form.NumberTextBoxMixin._formatter

    • parameters:
      • value: (typeof Number)
        The number to be converted into a string.
      • options: (typeof dojo.number.__FormatOptions)
        Formatting options
    • returns
      String
    • summary
      _formatter() is called by format().  It's the base routine for formatting a number,
      as a string, for example converting 12345 into &quot;12,345&quot;.
    • tags: extension
    • alias - dojo.number.format
    • type
      Function
  • dijit.form.NumberTextBoxMixin._setConstraintsAttr

    • parameters:
      • constraints: (typeof Object)
    • type
      Function
  • dijit.form.NumberTextBoxMixin._onFocus

    • type
      Function
  • dijit.form.NumberTextBoxMixin.textbox.value

  • dijit.form.NumberTextBoxMixin.format

    • parameters:
      • value: (typeof Number)
      • constraints: (typeof dojo.number.__FormatOptions)
    • summary
      Formats the value as a Number, according to constraints.
    • tags:
    • type
      Function
  • dijit.form.NumberTextBoxMixin._parser

    • parameters:
      • value: (typeof String)
        String representing a number
      • constraints: (typeof dojo.number.__ParseOptions)
        Formatting options
    • returns
      Number
    • summary
      Parses the string value as a Number, according to constraints.
    • tags:
    • alias - dojo.number.parse
    • type
      Function
  • dijit.form.NumberTextBoxMixin.parse

    • parameters:
      • value: (typeof String)
      • constraints: (typeof dojo.number.__FormatOptions)
    • summary
      Replacable function to convert a formatted string to a number value
    • tags: extension
    • type
      Function
  • dijit.form.NumberTextBoxMixin._getDisplayedValueAttr

    • type
      Function
  • dijit.form.NumberTextBoxMixin.filter

    • parameters:
      • value: (typeof Number)
    • returns
      set('value', null||''|undefined) should fire onChange(NaN)
    • summary
      This is called with both the display value (string), and the actual value (a number).
      When called with the actual value it does corrections so that '' etc. are represented as NaN.
      Otherwise it dispatches to the superclass's filter() method.
      
      See <code>dijit.form.TextBox.filter</code> for more details.
    • type
      Function
  • dijit.form.NumberTextBoxMixin.serialize

    • parameters:
      • value: (typeof Number)
      • options: (typeof Object)
    • summary
      Convert value (a Number) into a canonical string (ie, how the number literal is written in javascript/java/C/etc.)
    • tags:
    • type
      Function
  • dijit.form.NumberTextBoxMixin._setBlurValue

    • type
      Function
  • dijit.form.NumberTextBoxMixin._setValueAttr

    • parameters:
      • value: (typeof Number)
      • priorityChange: (typeof Boolean)
      • formattedValue: (typeof String)
    • summary
      Hook so set('value', ...) works.
    • type
      Function
  • dijit.form.NumberTextBoxMixin._getValueAttr

    • returns
      return exponential Number or undefined for random text (may not be possible to do with the above RegExp check)|gibberish|Number or NaN for ''
    • summary
      Hook so get('value') works.
      Returns Number, NaN for '', or undefined for unparsable text
    • type
      Function
  • dijit.form.NumberTextBoxMixin.isValid

    • parameters:
      • isFocused: (typeof Boolean)
    • returns
      valid exponential number in range
    • type
      Function
  • dijit.form.NumberTextBox

    • type
      Function
    • chains:
      • dijit.form.RangeBoundTextBox: (prototype)
      • dijit.form.NumberTextBoxMixin.prototype: (prototype)
      • dijit.form.RangeBoundTextBox: (call)
      • dijit.form.NumberTextBoxMixin: (call)
    • summary
      A TextBox for entering numbers, with formatting and range checking
    • description
      NumberTextBox is a textbox for entering and displaying numbers, supporting
      the following main features:
      
      1. Enforce minimum/maximum allowed values (as well as enforcing that the user types
      a number rather than a random string)
      2. NLS support (altering roles of comma and dot as "thousands-separator" and "decimal-point"
      depending on locale).
      3. Separate modes for editing the value and displaying it, specifically that
      the thousands separator character (typically comma) disappears when editing
      but reappears after the field is blurred.
      4. Formatting and constraints regarding the number of places (digits after the decimal point)
      allowed on input, and number of places displayed when blurred (see `constraints` parameter).
  • dijit.form.NumberTextBox.baseClass

    • type
      String
  • dijit.form

    • type
      Object
  • dijit

    • type
      Object