September 10, 2014

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 the message you want to display on the alert box
<alert-title> is the tile you want to display on the alert box
<button-text> is the text to be displayed on the button on alert box

No comments:

Post a Comment