Pages

Tuesday, September 30, 2014

Show Faces Message using JavaScript in ADF Faces

How to show faces Message using javaScript in ADF Faces


I have read this on Ashish Awasthi's blog. So if you want to read full detail sample refer to his blog.

For reference purpose, I am putting two lines of code here :

// Clear all validation message 
AdfPage.PAGE.clearAllMessages();

//Invoke FacesMessage
AdfPage.PAGE.addMessage('it1', new AdfFacesMessage(AdfFacesMessage.TYPE_ERROR, "Invalid Value", "Enter Characters Only"));


Other valid types are : TYPE_ERROR, TYPE_INFO, TYPE_WARNING, TYPE_FATAL .

Enjoy !!