1. Home
  2. Knowledge Base
  3. Deprecated Documentation
  4. Copy an Application (including m-Painter changes)

Copy an Application (including m-Painter changes)

This document has been deprecated. Please see the current documentation here.

The m-Power web interface includes a very useful tool that allows you to copy an application. You have a variety of copying choices:

  • Copy an Application of any type to the Same Data Dictionary
  • Copy an Application of any type to another Data Dictionary
  • Promote a Retrieval to a Report

However, in each of the three cases listed above, the copy function will only copy application specifications. That includes aspects such as:

  • Table/Field Selection
  • Sequencing
  • Calculations
  • Changes made in Field Settings
  • Template Type

All changes made via the Web Interface will be copied over, however no changes in m-Painter will be copied over. The system is designed like this intentionally as no generated objects (Java, XML, Class, and HTML files) are included in the copy process. This document will explain how to manually copy your custom painting to your copied application.

In this example, we have an Inquiry that we created and have painted extensively, Inquiry 120. I would like to make a copy of it to Inquiry 130 that will have the same painting.

Copy Inquiry 120 to Inquiry 130 via the Web Interface:

Build application 130. As of right now, I00130 does not contain any custom painting.

Next, lets go back into m-Painter for the original Inquiry, 120. From here, click “Source” to view the source.

Press CTRL+A to select all the text, and CTRL+C to copy all of the Source code on your Clipboard (if you are copying a Report or Work-with Maintainer, please keep in mind that there are two screens for each template that will need to be copied).

Close Painter for Inquiry 120 and next open Painter for Inquiry 130. Click “Source” to view the source.

Press CTRL+A to select all text, and press the Delete key. You should now see a blank screen. Press CTRL+V to paste all of the source from I00120 to I00130.

The final step is to change all references of 120 to 130 in the HTML source code. While we could manually examine the document for each one, the “Search” command is much better suited. In the m-Painter toolbar, look for the binoculars:

Calendar servlet 4.bmp

Clicking the above “Search” button will bring up the following pop-up window:

Place the original application number in the “Find what” box. Place the new application number in the “Replace with” box. It is recommended to search for the entire 5 string application number to minimize the chance of finding a false positive. Press “Replace All”.

Note: There will not be a confirmation pop-up. Simply, the application will replace all matching data. Click “Cancel” to close the pop-up box, and click the “Save and Deploy” button to commit your changes to hard disk. Congratulations, you should now have two duplicate applications!

Note: You will also need to copy over any changes made in the .XML file. While you can employ a similar strategy to copy over the Properties file, it is usually quicker to change those attributes manually as there are only a few that are changed (such as Advanced Search, Advanced Sort, Max_Rows, AJAX , etc…).

Updated on December 6, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support