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.  CAF UI question

    Posted Mon March 05, 2012 04:35 AM

    Hi all,

    I am new to webMethods development and I have a question that is bugging me for some time. When an error appears on the page due to a webMethods provided validator the error appears both bellow the problematic field and also if trying to go elsewhere, let’s say clicking on a command button the error will appear in a blue modal window which is kind of annoying. Is there any way to prevent the modal window to appear. The users see the same error in 2 different ways and can get confused.

    Thank you very much.

    I’ve attached a screenshot for the problem.


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


  • 2.  RE: CAF UI question

    Posted Tue March 06, 2012 03:43 AM

    Hi,
    I think you have placed your text control inside a property line.
    The validation message generally appears below the control whenever the control is placed inside a property line.
    Please use static rows and static cells for formatting the page.

    Regards,
    Sravan


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


  • 3.  RE: CAF UI question

    Posted Tue March 06, 2012 07:09 PM

    The validation popup dialog comes from the CAF.ErrorHandler.handleFormValidationError function. See:

    [url=‘http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_sp2/My_webMethods/8-2-SP1_CAF_JavaScript_Reference/CAF.ErrorHandler.html#!s!handleFormValidationError’]http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_sp2/My_webMethods/8-2-SP1_CAF_JavaScript_Reference/CAF.ErrorHandler.html#!s!handleFormValidationError[/url]

    You can override that function if you want to suppress the popup dialog for specific forms.

    For example, you could put something like this in a script block control for your portlet:

    
    if (!window.customFormValidationErrorHandler) {
    var originalFn = CAF.ErrorHandler.handleFormValidationError;
    window.customFormValidationErrorHandler = function(forms, msg) {
    var formId = '#{caf:cid("defaultForm")}';  //the id of the form to suppress the popup for
    if (forms && forms.indexOf(formId) != -1) {
    //suppress the popup for this form
    } else {
    //fallback to the original handler for other forms
    originalFn(forms, msg);
    }
    }    
    }
    
    //swap out the function with our custom one.
    CAF.ErrorHandler.handleFormValidationError = window.customFormValidationErrorHandler;

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