mrc logo mrc logo
  • m-Power m-Power
    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
  • Solutions Solutions
    What does m-Power build?
    Overview Database Front-Ends 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 and Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Services Services
    Development Services Training Mentoring
  • About About
    Overview Partners Press Releases Careers Events Contact Blog
  • Support Support
    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

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

See all tags »

michaels, ross & cole, ltd. (mrc)

Privacy Policy Cookie Policy Cookie Settings Notice at Collection Do Not Sell or Share My Personal Information

mrc (US)

2001 Midwest Road
Suite 310
Oak Brook, IL 60523
630-916-0662

mrc (UK)

Mortlake Business Centre
20 Mortlake High Street
London, SW14 8JN
+44-20-335-59566


© 2024 mrc. All rights reserved.