javascript validation

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

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

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”, “||”, “?”]

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();

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?

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