Menu
Tag

JavaScript

TypeError: h.apply is not a function

This is a Knockout JS error. I faced this issue when I am trying to invoke click action of a link created. My link statement is like below. <a data-bind=”attr:{id:Reqid},text: Title,click: $(‘#popup1’).ojPopup(‘open’, ‘#btnTitle’)”></a> And on click of this link, I am getting the below error. TypeError: h.apply is not a function This is because the click handler needs to be…

Displaying alert message on AMX page from Managed Bean

Below java code is useful to display alert messages on AMX pages in MAF from managed bean. AdfmfContainerUtilities.invokeContainerJavaScriptFunction(“<feature-id>”, “function(){navigator.notification.alert(‘<message>’,  function(){}, ‘<alert-title>’, ‘<button-text>’);}”,    new Object[] { }); Ex:   AdfmfContainerUtilities.invokeContainerJavaScriptFunction(“feature1”, “function(){navigator.notification.alert(‘Request has been submited.’,  function(){}, ‘Information’, ‘OK’);}”, new Object[] { }); Where <feature-id> is the id of the feature on which you want to display the alert message <message> is…

Invoking javascript method from an ADF component

This post is to show how we can invoke a java script method from an ADF component like af:goLink Write a javascript. We can also use external javascript file but in this example I am writing a small javascript method using af:resource. Below is my java script method. <af:resource type=”javascript”>  function sayHello() { alert(“Welcome to Hello World”);}  </af:resource> Create a…

Hi, Welcome here.
JOIN OUR NEWSLETTER
And get notified everytime we publish a new blog post.