How to show inline FacesMessage in page in Oracle ADF -
When we want to show any information , warning or error , we use FacesMessage Component. you can see on Show FacesMessage how we do this.But sometimes we want to show Message in the same page, it means inside the page, In this tutorial we will see how to show Inline Message in ADF
FacesMessage look like this
But now we will use Inline Message, For this follow these steps
- Create a Fusion Web Application
- Now in ViewController create new Page
- Now drop a button on page
- Write this code on button ActionListener
public void showMessageButton(ActionEvent actionEvent) { FacesMessage msg=new FacesMessage("This is a FacesMessage that+ "shows Fatal Error --JavaCup"); msg.setSeverity(FacesMessage.SEVERITY_FATAL); FacesContext fctx=FacesContext.getCurrentInstance(); fctx.addMessage(null, msg); }
Download Sample Application
No comments:
Post a Comment