IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  TextInput mask

    Posted Tue May 31, 2016 06:21 PM

    Hello,

    Is it possible to mask a textInput? For example, in a date field the user is writing the value and automatically is getting a mask.

    I tried something like that:

    var htmlInputText = CAF.model('#{activePageBean.clientIds['htmlInputText']}');
    htmlInputText.setMask('99/99/9999');

    Thanks!


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine


  • 2.  RE: TextInput mask

    Posted Tue May 31, 2016 07:05 PM

    The client-side model of the input text control does not currently provide support for a mask. However, there are certainly many 3rd party javascript libraries that can do something like that or you can probably accomplish it with your own custom javascript code in the keyup client-side event handler of the text input control.

    For example, something like this as the keyup client-side event handler:

    
    var v = this.value;
    if (v.match(/^\d{2}$/) !== null) {
    this.value = v + '/';
    } else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
    this.value = v + '/';
    }

    If there are areas that you or a customer would like to be improved in documentation or functionality, then you can make a proposal in brainstorm @ https://empower.softwareag.com/Products/FeatureRequestsInBrainstorm/default.asp for consideration in a future release.


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS