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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Blur event for Modal Dialog

  • 1.  Blur event for Modal Dialog

    Posted Thu February 18, 2016 05:30 PM

    Is there a way we can add a onblur event on the modal dialog.
    I do not want my users to explicitly click on a button to close the dialog, instead anywhere outside the window also should do it.


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


  • 2.  RE: Blur event for Modal Dialog

    Posted Thu February 18, 2016 08:38 PM

    You can use javascript in a script block to add a listener to get notified when the dialog has been toggled open. Then find the associated “__dim” overlay that is under the dialog and listen for click events on that.

    For example, something like this:

    
    CAF.model("#{caf:cid('dialogIdHere'}").addToggleListener(function(dlg) {
    if ("show" == dlg.way) {
    //attach a click listener to "__dim" overlay under the dialog
    $(dlg.id + "__dim").on("click", function() {
    //clicked, so hide the dialog
    CAF.model(dlg.id).hide()
    });  
    }
    });

    If you would like the ModalDialog control to be improved and provide this capability out of the box, then you can make a proposal in brainstorm @ [url]https://empower.softwareag.com/Products/FeatureRequestsInBrainstorm/default.asp[/url] for consideration in a future release.


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