When we use any technology sometimes we need to show an alert message or warning or confirmation.
In Oracle ADF we use Faces Message same as JSF.
In this tutorial I am showing you that how to implement inline FacesMessage .
Those who are familiar with Oracle ADF can create basic architecture of MVC.
So follow these steps
- Create a Fusion Web Application in Jdeveloper(IDE)
- Now in ViewController create new Page.
- Simply drag a CommandButton from Component Palette to page
- and Write this code on button
public void showMessageButton(ActionEvent actionEvent) { FacesMessage msg=new FacesMessage("This is an inline FacesMessage"); msg.setSeverity(FacesMessage.SEVERITY_FATAL); FacesContext fctx=FacesContext.getCurrentInstance(); fctx.addMessage(null, msg); }
- It will work as FacesMessage
- Now drag a af:messages component in page from Component Palette
- Select af:messages and go to property inspector and set Inline-true
- Now run your page and click on button , it will look like this
- This is how we show inline alert in Oracle ADF



No comments:
Post a Comment