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
credit - http://www.awasthiashish.com/2012/10/show-inline-message-in-oracle-adf.html
No comments:
Post a Comment