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
  • 1.  javascript validation

    Posted Wed November 12, 2008 06:15 PM

    Is there a way to call async command from javascript? I see it on the page in raw format:

    But is there a cleaner way of doing it? Basically I want to validate on a text input box onblur function but that isn’t available from the invoke script unless it is a mouse over/out which is annoying behaviour. Thanks in advance


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


  • 2.  RE: javascript validation

    Posted Wed November 12, 2008 07:13 PM

    Yes, that is easy. The common pattern on accessing client side model is:

    CAF.model(‘#{activePageBean.clientIds[“idOfMyControl”]’)

    So to fire an async command you use following script:

    CAF.model(‘#{activePageBean.clientIds[“myAsyncButtonID”]’).raise();

    Please see full client side model reference at:

    http://www.ajax-softwareag.com/articles/3IE5OA/wm_cafshared-doc-7.1.1/wm_cafshared-doc-7.1.1/overview-summary.html


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


  • 3.  RE: javascript validation

    Posted Wed November 12, 2008 08:01 PM

    in putting
    CAF.model(‘#activePageBean.clientIds"htmlInputTextMatterName"]’).raise();

    I get “invalid expression for property ‘blur’: encountered “”, expected one of [”}", “.”, “>”, “gt”, “<”, “lt”, “==”, “eq”, “=”, “ge”, “!=”, “ne”, “[”, “+”, “-”, “*”, “/”, “div”, “%”, “mod”, “and”, “&&”, “or”, “||”, “?”]


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


  • 4.  RE: javascript validation

    Posted Wed November 12, 2008 08:16 PM

    Please read article about binding expressions syntax:

    http://www.ajax-softwareag.com/articles/1FAQ03/BindingExpressions/BindControls_index.html

    I’m reading your post as:

    CAF.model(‘#activePageBean.clientIds"htmlInputTextMatterName"]’).raise();

    If this is correct you are missing some brackets:

    CAF.model(‘#{activePageBean.clientIds[“htmlInputTextMatterName”]’).raise();


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


  • 5.  RE: javascript validation

    Posted Wed November 12, 2008 08:34 PM

    First example was missing closing brace “}”

    My example was missing brackets

    CAF.model(“#{activePageBean.clientIds[‘hiddenMatterValidate’]}”).raise();

    This works - thanks
    Follow up question is now that this works succesffully and it is supposed to be async command - why does it override my page w/ “Loading…” if it is async shouldn’t be behind the scenes? can I force it to behind the scenes or some other style should be used?


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


  • 6.  RE: javascript validation

    Posted Thu November 20, 2008 05:57 PM

    To suppress the loading message, add a HideablePanel to the page, place the content you want to refresh inside the HideablePanel, set the HideablePanel’s “progressDelay” property to 0, and set the command’s “refresh” property to the id of the HideablePanel.

    Justin


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