Tuesday, March 19, 2013

Change ADF Default Error Messages

How to change ADF default messages

These are some requirement on which we want to change the default adf error messages.

I am explaining the way here using that you can change the ADF default error messages.


Default Adf Messages:

 

There are different way of doing this :
  •  Using Property File
  •  Using ListResourceBundle

Using Property File

Steps need to follow for using the property file:
  •   Create a property file like Messages_en.properties 
  •  Add the below lines in faces-config.xml



 

      Property file is as follows

org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED=You must enter value for this fields.

org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED_detail=Value is required in order to submit form.

Using ListResourceBundle
  • Create the java class which extends from ListResourceBundle
  • Code for java class are as follows:

public class CustomMessageBundle extends ListResourceBundle

{

  @Override

  public Object[][] getContents()

  {

    return new Object[][] { { "org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED", "You must enter value for this fields" },{ "org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED_detail", "Value is required in order to submit form." } };

  }

}

3.       Add this file to resource bundle like


  


After Error Message look like:


Sample Application can be found on click here 

30 comments:

  1. I am facing a problem related to ADF Error Popups. On IE8 this popup (similar to what you've shown in this post) goes away automatically without us doing anything. This is not happening on Firefox/Safari/Chrome. I did research on IE8 forum but nothings worked so far.

    Can you share your views on it?

    Note : I notice that on IE8 when the error popup comes up, it stays there for a second or so and then the Text / View behind it (In your example - Name & Date of Birth Popup) gets refreshed automatically and the Error popup goes away. I've tried disabling all PPR and autoSubmit but no results.

    Would really appreciate your help on this.

    ReplyDelete
  2. Pretty good post. I just came across your site and wanted to say that I’ve really enjoyed reading your posts. In any case I’ll be subscribing to your feed and I hope you will keep a good work!Cheer!


    sap online training
    software online training
    sap sd online training
    hadoop online training
    sap-crm-online-training

    ReplyDelete
  3. This is one awesome blog article. Much thanks again.
    I really enjoy the blog.Much thanks again. Really Great.


    oracle online training
    sap fico online training
    dotnet online training
    qa-qtp-software-testing-training-tutorial

    ReplyDelete

  4. After reading this web site I am very satisfied simply because this site is providing comprehensive knowledge for you to audience.
    Thank you to the perform as well as discuss anything incredibly important in my opinion. We loose time waiting for your next article writing in addition to I beg one to get back to pay a visit to our website in



    selenium training in Bangalore

    selenium training in Marathahalli

    selenium training in Btm layout

    selenium training in Jaya nagar

    selenium training in Electronic city

    selenium training in Kalyan nagar

    ReplyDelete
  5. I enjoyed every section of this informative and educational post.service now training online

    ReplyDelete
  6. If you're planning to enroll in a Salesforce developer course online, OnlineITGuru provides comprehensive training with real-time examples and project work. It's suitable for both beginners and experienced IT professionals.salesforce developer course online

    ReplyDelete
  7. Power BI Live Training offers an interactive learning experience where students can engage directly with expert trainers. Live sessions provide opportunities to ask questions, solve real-world scenarios, and receive immediate feedback. Practical assignments and project-based learning make it easier to understand Power BI concepts and apply them confidently in professional environments.power bi course online

    ReplyDelete
  8. Practical learning is especially important when working with business intelligence tools. Power BI live training can give learners the opportunity to follow demonstrations and clarify their questions while learning. This article provides some useful points.power bi live training

    ReplyDelete
  9. A DataStage full course provides end-to-end training for professionals who want to master enterprise ETL and data integration. This datastage full course covers DataStage architecture, job development, transformations, workflow management, debugging, and deployment. Learners gain practical skills through industry-focused projects.

    ReplyDelete
  10. Great information for anyone interested in data analytics and visualization. A Tableau online course can help learners develop practical skills in creating dashboards, analyzing data, and presenting meaningful insights.tableau online course

    ReplyDelete
  11. Online training Tableau provides a convenient way to learn data visualization and dashboard development from any location. Practical projects using real datasets can help learners understand how to transform business data into meaningful visual reports.online training tableau

    ReplyDelete

Thanks for your valuable comment. You comment will go live soon.