On a ADF form bound to a updatable view object, when you hit the submit button after entering data, error messages may come up due to failures like required attribute missing, business logic failure written at EO level etc.
By default these messages comes as a popup on the screen. If you want them to appear on the page itself instead of a popup then there is a property 'inline' in the af:messages component. You can set it to true.
However, there may be a requirement where you want to display the messages as inline if it's just one message and in a popup if more than one. To do that, you can create a request scope managed bean and count the size of iterator FacesContext.getCurrentInstance().getMessages(); Based on the count you can return true or false.
A sample workspace can be found here
By default these messages comes as a popup on the screen. If you want them to appear on the page itself instead of a popup then there is a property 'inline' in the af:messages component. You can set it to true.
However, there may be a requirement where you want to display the messages as inline if it's just one message and in a popup if more than one. To do that, you can create a request scope managed bean and count the size of iterator FacesContext.getCurrentInstance().getMessages(); Based on the count you can return true or false.
A sample workspace can be found here
3 comments:
hi, new to the site, thanks.
Useful Post. It was so easy.
That way the default error message for the component - af:fileDownloadActionListener's error message 'The file was not downloaded or was not downloaded correctly.'
Useful post, it was easy to change the default error message of
af:fileDownloadActionListener 'The file was not downloaded or was not downloaded correctly.'
Post a Comment