webMethods

webMethods

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
Expand all | Collapse all

Capturing a right-click paste mouse event with webMethods 8.2

  • 1.  Capturing a right-click paste mouse event with webMethods 8.2

    Posted Tue November 10, 2015 01:16 PM

    I am trying to use the onPaste event with a txtArea object within the CAF. I am not seeing an event available for onPaste in the ClientSide Events, but I am wondering if this can be added to the object via something with javascript. Currently, we have Ctrl-V working fine and firing the validation javascript, but the mouse event, right-click paste, is not firing the javascript.

    Has anyone implemented this within webMethods 8.2? I had not seen the onPaste event in the past, so I am wondering if this was added to webMethods 9.x, which is a while away for this customer.

    Thank you

    Daryl


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


  • 2.  RE: Capturing a right-click paste mouse event with webMethods 8.2

    Posted Tue November 10, 2015 01:31 PM

    You can use a script block and the observation support (see [1]) from prototypejs for observing the paste event:

    1. [url]http://api.prototypejs.org/dom/Event/observe/[/url]

    For example:

    var m = CAF.model("#{caf:cid('yourTextInputId')}"); 
    
    if (m) {
    //observe the paste event
    Event.observe(m.element, "paste", function(e) {
    //TODO: your paste logic here
    });
    }

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