C_PromptTextBox.js 3.7 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: cchl
  3. // (C) Copyright IBM Corp. 2003, 2016.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. function C_PromptTextBox(_cVG, _c6M, _cCB1, _cTS){G_HAL.F_VerifyDependencies("G_ResManager");G_HAL.F_VerifyDependencies("U_PromptInputParser");G_HAL.F_VerifyDependencies("C_PromptBaseTextBox");this.F_ConstructBaseClass(_cVG, _c6M, _cCB1, _cTS);this._c0D();if(!_cTS){this._cO7();}this._c2();if(this._cSQ){this.F_UpdateControlStyle(_cVG);}var _cNG=this._cBT1();this._cAB=null;if(this._c0P1){G_HAL.F_VerifyDependencies("C_PromptRange");this._cAB=new C_PromptRange(_cNG, _c6M, this, C_PromptRange._cDI1, this.F_GetSimpleDefaultValue());}else{if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){C_PromptControl.F_AddAriaLabelledByParm(_c6M, _cNG.getAttribute("aria-labelledby"));C_PromptControl.F_AddAriaLabelParm(_c6M, G_ResManager.F_GetOptionalString(_cNG.getAttribute("HAL_idsAriaLabel")));}this._cAB=new C_PromptBaseTextBox(_cNG, _c6M, this, this.F_GetSimpleDefaultValue());}if(this._cSQ){this.F_UpdateInnnerControlStyle(_cVG, ["pt", "pv"]);}if(_c6M.getAttribute( "required" )=="false" ){this._cU3();}};C_PromptTextBox.F_Extends(C_PromptPublicControl);C_PromptTextBox.prototype._c0D=function(){C_PromptTextBox.superClass._c0D.call(this);this._cVI1=(this._cWM.getAttribute("numbersOnly")==="true"?C_SimpleValue._c8L1:C_SimpleValue._cUR1);this._c64=(this._cWM.getAttribute("showThousandSeparator")==="true"?true:false);};C_PromptTextBox.prototype.F_ValidateInput=function(){return this._cAB.F_ValidateInput();};C_PromptTextBox.prototype.F_FormatInput=function(){return this._cAB.F_FormatInput();};C_PromptTextBox.prototype.F_Focus=function(){this._cAB.F_Focus();};C_PromptTextBox.prototype._c2=function(){var _c3I1=( this._cWM.getAttribute( "numbersOnly" )=="true" )?C_SimpleValue._c8L1:C_SimpleValue._cUR1;var _c74=( this._cWM.getAttribute( "showThousandSeparator" )=="true" );for(var i=0;this._c8O&&(i<this._c8O.length);i++){this._c8O[ i ].F_SetDisplayProperties(_c3I1, _c74);}};C_PromptTextBox.prototype.F_SetValue=function(_cGN1){if(this._cAB.F_SetValue){this._cAB.F_SetValue(_cGN1);}};C_PromptTextBox.prototype.F_GetDisplayValue=function(){if(this._cAB.F_GetDisplayValue){return this._cAB.F_GetDisplayValue();}return null;};C_PromptTextBox.prototype.F_GetUseValue=function(){if(this._cAB.F_GetUseValue){return this._cAB.F_GetUseValue();}return null;};C_PromptTextBox.prototype.F_SetEnabled=function(_cAM1){this._cAB.F_SetEnabled(_cAM1);};C_PromptTextBox.prototype.F_IsEnabled=function(){return this._cAB.F_IsEnabled();};C_PromptTextBox.prototype.F_IsValid=function(){return this._cAB.F_IsValid();};C_PromptTextBox.prototype.F_SetMinNumber=function(_cGN1){if(this._cAB.F_SetMinNumber){this._cAB.F_SetMinNumber(_cGN1);}};C_PromptTextBox.prototype.F_SetMaxNumber=function(_cGN1){if(this._cAB.F_SetMaxNumber){this._cAB.F_SetMaxNumber(_cGN1);}};C_PromptTextBox.prototype.F_SetMinInclusive=function(_cGP1){if(this._cAB.F_SetMinInclusive){this._cAB.F_SetMinInclusive(_cGP1);}};C_PromptTextBox.prototype.F_SetMaxInclusive=function(_cGP1){if(this._cAB.F_SetMaxInclusive){this._cAB.F_SetMaxInclusive(_cGP1);}};C_PromptTextBox.prototype.F_SetInvalidMessage=function(_cYS1){if(this._cAB.F_SetInvalidMessage){this._cAB.F_SetInvalidMessage(_cYS1);}};C_PromptTextBox.prototype.F_PromptControl_OnValidate=function(_c5M,_c131,_cGN1){if(this._cDB1.F_PromptControl_OnValidate){return this._cDB1.F_PromptControl_OnValidate(this, _c131, _cGN1);}return _c131;};C_PromptTextBox.prototype.F_PromptControl_OnValueChange=function(){this._cU3();};C_PromptTextBox.prototype.F_CreateSimpleValue=function(){return new C_SimpleValue(this._c0P1, null, this._cVI1, this._c64);};