NumberDialog

Top  Previous  Next

NumberDialog is a Process Field. It can be used inside or outside of a ProcessRecord Element. It encloses a hidden and two text input elements. The text input elements is used to edit the number value and the hidden input element is used submit the value in submit format.

  <span mo:type="NumberDialog" mo:name="PRICE" mo:field="true" mo:needsInit="true" 
       mo:iValue="{PRICE}"
       mo:props="
          allowSign       : true, 
          precisionDigits : 2, 
          round           : ${round}
          padZeros        : ${padZeros}
          nonBlank        : true, 
          validValues     : '1:22',
          valHandler      : MyValHandler, 
          valErrorHandler : MyErrorHandler
       ">
    <input type="hidden" name="pf_PRICE"/>
    <input type="text" name="__LeftPart" onblur="NumMgr.formatLeftPart(this,true)" 
            onkeyup="NumMgr.formatLeftPart(this)" />
    <span mo:type="DecimalPoint">.</span>
    <input type="text" name="__RightPart" onkeyup="NumMgr.formatRightPart(this)" />
  </span>

The grouping separator and the decimal point symbol characters are taken from the nearest enclosing pageInfo definition.

 

See NumberDialog Function Class in MoreMotion Face API.

Properties

allowSign

Specify true if the value can be negative.

precisionDigits

The number of the precision digits that can be entered after the decimal symbol.

 
round

Specify true to round the displayed value.

padZeros

Specify true to pad zeros at the right side when precision digits are less than the specified.

 
See Validation Properties

Note that the validation properties are effective only if the this is placed into a Process Record.

 

Required Javascript Files

This element requires the following Javascript files are linked to the page in the HEAD section of the HTML document as follows.

  <head> 
    ...
    <script type="text/javascript" src="moremotion/face/DateNum/Number.js"></script>
    <script type="text/javascript" src="moremotion/face/_resources/<language-code>/DateNum.js"></script>
  </head>