Skip to Content mrc logo mrc logo
  • What is m-Power?
    Overview Demos Build Process Case Studies Specs Pricing Trial
    m-Power Resources
    Overview How-To Videos Webinars & Podcasts White Papers Fact Sheets
  • What does m-Power build?
    Solutions by Industry
    Overview Database Front-Ends AI Reporting CRM Systems Business Intelligence Dashboards Inventory Management Mobile Apps ERP Enhancements Modernization
    Spreadsheets to the Web MS Access to the Web B2B/Web Portals Scheduling Embedded Analytics Web Forms Workflow Data Exploration Budgeting & Forecasting APIs & Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Development Services Training Mentoring
  • Overview Partners Press Releases Careers Events Contact Blog
  • Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • m-Painter
  • Customize Error Messages in your Web Applications
Back to Manual

Customize Error Messages in your Web Applications

 

Many developers want flexibility. Appropriately, they deserve it! One way to get flexibility within your m-Power applications is to customize your error messages. While m-Power generates generic terms such as "Invalid User" or "This record already exists" automatically, you can override these messages to something much more appropriate for your web application. For instance, if you are creating a Shopping Cart, you would most likely prefer a message that encourages users to add items to an empty shopping cart in lieu of a "This record does not exist" message.

There are two ways to add customized error messages: on an application level or for the entire Data Dictionary. Simply stated, you should choose the "per application" option if your error message only corresponds to a few applications. For convenience's sake, both methods will be explained:

Per Application Method

If you decide that your Custom Error Message would only apply to a few applications (rather than every application in your Data Dictionary), you should choose this method. Build and compile your application as you normally would. Next, click the "Application Properties" button for your application.

In the m-Painter window, click the "Override Properties" tab:

From the "Override error message" drop-down, select the Default Error Message you wish to customize (in this example, we will customize the "This Record Does Not Exist" message). Click the "Add" button:

Modify the "Value" section to whatever you would like your message to say at Runtime in place of the default message. Here we will program it to say: "No such record — please retry your search."

Click "OK" to save.

When I re-run my application, here is my output when the default "Record does not Exist" message should appear:

Per Data Dictionary Method

If you decide that your custom error messages could apply to all applications within your Data Dictionary, choose this method.

Click the Admin tab, then click the "Edit Data Dictionary Files" link.

Click the "Servlet Properties" link.

Click the "Others" tab to customize messages.

Note: You can also change default images from this tab (such as back & next buttons for Multiple Record/Work-With Templates).

Note: You can also change Maintainer Messages by clicking the "Maintainer Message" tab.

Change the "Value" for the appropriate Error Message name. When completed, hit the "OK" button. Finally, click the "Save and Deploy" icon.

Note: When necessary, changes made at the Application Level supersede changes made at the Data Dictionary Level.

Created: September 22, 2008 | Modified: August 18, 2017

Search


Browse By Category

Build Process (13)
Starting with m-Power (8)
Retrievals (10)
Reports (15)
Summaries (4)
Maintainers (17)
Graphs (8)
m-Power Data Explorer (4)
General (24)
Calculations (5)
Utilities (9)
m-Power Administration (23)
Security (11)
Freemarker (6)
m-Painter (29)
Form Validation (5)
External Objects & UDFs (12)
Deprecated Documentation (23)
Bootstrap Templates (7)

Popular Tags

Maintainer Database Build Process Summaries Getting Started Excel Bar Graphs Tomcat Record Selections Compiling Maintainers Form Validation Java Dropdowns Email Graphing Calculations Advanced Bootstrap Templates DB2 RPG Graphs Performance Administration Production External Objects Popular Reports Security Freemarker Graph Properties m-Painter Admin Parameters Prompt Screens mrc-Productivity Series Data Dictionary Report Retrievals Video SQL Dates Application Properties App Properties Retrieval

See all tags »

mrc

Build the custom apps and AI tools your business needs with m-Power, or have our Chicago-based team build them with you. One platform, one team that makes sure you succeed.

Since 1981 · 1,500+ customers · 4.7/5 on G2

m-Power
Overview Demos Build Process Licensing Specs Get a Demo
Solutions
Database Front-Ends Reporting AI Tools Dashboards ERP Enhancements Modernization See all solutions
Company
Case Studies Services About Blog Careers Contact Support

Privacy Policy Cookie Policy Cookie Settings

michaels, ross & cole, ltd. (mrc)
US: 2001 Midwest Road, Suite 310, Oak Brook, IL 60523 · 630-916-0662
UK: Mortlake Business Centre, 20 Mortlake High Street, London, SW14 8JN · +44-20-335-59566
© mrc. All rights reserved.