PromptDataRestrict.js 486 B

1234567891011121314151617181920212223242526
  1. define(function () {
  2. "use strict";
  3. function PageModule() {
  4. };
  5. function myvalidator(iMin, iMax, aValues) {
  6. return (aValues[0].use >= iMin && aValues[0].use <= iMax);
  7. };
  8. PageModule.prototype.load = function (oPage) {
  9. var iMin = parseInt(oPage.getControlByName("txtMinValue").text);
  10. var iMax = parseInt(oPage.getControlByName("txtMaxValue").text);
  11. oPage.getControlByName("txtIDValue").setValidator(myvalidator.bind(null, iMin, iMax));
  12. };
  13. return PageModule;
  14. });