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.  How do you disable an autocomplete fields programmatically?

    Posted Thu June 30, 2016 03:23 PM

    How do you disable an autocomplete field programmatically?

    I’ve tried:

    $(“jsfwmp8809:defaultForm:AOI”).disabled = true;

    $(“jsfwmp8809:defaultForm:AOI”).autocomplete = “off”;

    CAF.Model(“jsfwmp8809:defaultForm:AOI”).SetDisabled(true);

    None of these work. Am I left with the only option is to hide this control and display a simple text field in its place?


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


  • 2.  RE: How do you disable an autocomplete fields programmatically?

    Posted Thu June 30, 2016 03:31 PM

    The prototypejs way to set an attribute on an element is documented at [1].

    1. [url]http://api.prototypejs.org/dom/Element/prototype/writeAttribute/[/url]

    Which equates to something like this:

    $("jsfwmp8809:defaultForm:AOI").writeAttribute("disabled", "true");
    
    $("jsfwmp8809:defaultForm:AOI").writeAttribute("autocomplete", "off");

    Or via the CAF model:

    CAF.model("jsfwmp8809:defaultForm:AOI").setDisabled(true); 

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


  • 3.  RE: How do you disable an autocomplete fields programmatically?

    Posted Thu June 30, 2016 03:40 PM

    That works. I thought I’d tried that.

    Now that its disabled when I submit the form the validation kicks off. How do I stop that?


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


  • 4.  RE: How do you disable an autocomplete fields programmatically?

    Posted Thu June 30, 2016 03:44 PM

    I assume you mean that no validation happens on the disabled field?

    Generally, disabled fields aren’t validated or sent to the server.

    If you want the field to not be editable but still be validated and submitted, you probably want to set it as readonly instead of disabled.

    For example:

    $("jsfwmp8809:defaultForm:AOI").writeAttribute("readonly", "true");  

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


  • 5.  RE: How do you disable an autocomplete fields programmatically?

    Posted Thu June 30, 2016 04:53 PM

    Is there a CAF.model method to do that?


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


  • 6.  RE: How do you disable an autocomplete fields programmatically?

    Posted Thu June 30, 2016 04:57 PM

    No, since it would be duplicating logic already provided by others.


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


  • 7.  RE: How do you disable an autocomplete fields programmatically?

    Posted Thu June 30, 2016 05:04 PM