hiddenPromptValue.js 624 B

1234567891011121314151617181920212223242526
  1. define( function() {
  2. "use strict";
  3. function PageModule()
  4. {
  5. };
  6. function myvalidator(aValues) {
  7. alert("There is a hidden prompt on this page. When you press OK, the prompt value will be set and the Finish button 'clicked' for you");
  8. return (aValues =='Camping Equipment');
  9. }
  10. PageModule.prototype.load = function( oPage )
  11. {
  12. var oControl = oPage.getControlByName( "TEXT1" );
  13. var selection = [{'use': 'Camping Equipment'}];
  14. oControl.setValues(selection);
  15. var mySetValue=oPage.getControlByName( "TEXT1" );
  16. oPage.getControlByName("TEXT1").setValidator(myvalidator.bind(null, mySetValue));
  17. };
  18. return PageModule;
  19. });