m-Painter Frequently Asked Questions

 

How do I use m-Painter to…

Apply a Smartlink to a field?

  1. Click the field or the image that you wish to apply the Smartlink.
  2. Click the Insert/Edit Link button.
  3. Select the desired Smartlink from the Smartlink URL drop-down list.
  4. Click OK to assign that link to that element.
  5. Click Save.

Specify that a link should open in a new window?

  1. Click the element containing the link.
  2. Click the Insert/Edit Link button.
  3. Click the Target tab.
  4. Select “” in the Type/Target drop-down list and set values like width, height, left, and top.
  5. Click OK to update those parameters for that link.
  6. Click Save.

Change the text on a Submit button?

  1. Right-click on the Submit button.
  2. Select “Button Properties”.
  3. Change the text input and click OK.
  4. Click Save.

Stop a Column/Row/Table From Printing in a Report?

Column

  1. Select one of the cells in the column and right-click.
  2. Select “Column”, and then click “Delete Columns”.
  3. Click Save.

Row

  1. Select one of the cells in the row and right-click.
  2. Select “Row”, and then click “Hide Row” or “Delete Row”.
  3. Click Save.

Note: Hiding the row will still show the row in m-Painter, however at runtime, the row will not be present.

Table

  1. Select one of the cells in the table and right-click.
  2. Select “Table”, and then click “Hide Table” or “Delete Table”.
  3. Click Save.

Note: Hiding the table will still show the table in m-Painter, however at runtime the table will not be present.

Make an input field required?

  1. Find the proper input field and right click on the textbox.
  2. Click “Make Field Required”.
  3. Click Save.

Note: The default error message “This field is required” can be modified to read whatever is necessary for this application.

Increase the number of records allowed in a report?

  1. Open the “Application Properties”.
  2. Navigate to the “Options” tab (shown by default), and search for the “max_records” and “max_web_records” values.
  3. Modify these values up or down to your desired upper limits.
  4. Click OK.

Note: If the report is only run from batch, then only the “max_records” needs to be modified. If the report is only being run interactively (from a browser), only the “max_web_records” needs to be modified. However, both may be modified to ensure the limit is properly set.

Note: There is no “No Limit” setting for your protection.

Compiling

When to recompile

After an application is first created, a compile is necessary to create the proper output files, such as the HTML presentation layer(s), the Application Properties XML file, and the Java and Class files which control the actual data portion of the application.

Note: If you are unsure if an application has been compiled, open the Application Menu for this application, and check the “Execute”, “Presentation”, and “Properties” buttons. If they are grayed out, this application has not been compiled yet, as seen below:

 

Once the application has been compiled, the actual look and feel of the application can be modified in the Application Properties and in m-Painter. However, there may be times when after compiling, an additional calculation is needed or a new field is added. In these situations, when a change is made in the Application Menu, a recompile is needed to pull in the new data.

A common question: Is it necessary to recompile an application after I have painted it?

Not at all. Think of it as if you were building a house. Compiling and building your application is the actual construction phase. Using m-Power would be equivalent to decorating the interior. In fact, you should, as a good rule of thumb, try to wait on using m-Painter until you have built your application just right. It is frustrating to use m-Painter to paint a perfect application, only to realize you are going to need to recompile and overwrite the existing HTML — only to start back over from scratch.

Note: Recompiling your application, with the overwrite html flag set to “Yes”, will erase all the changes you have made to your document through m-Painter.

When to overwrite the HTML

When a user first begins to use the m-Power interface, one of the biggest questions they have is what to do when they come to this screen:

This screen is seen whenever someone tries to recompile an application that already exists. Our logic checks to see if generated code already exists on the server, and if it does, we check to see how you want to proceed. Of course, we will update the back-end Java code to ensure your latest changes within the Application Menu screens are included, but we need to check with you to see how to handle the HTML presentation files and the XML Application Property files.
Ideally, you make any necessary changes within Application Menu, compile, then save any m-Painter and HTML changes until last. However, since that rarely happens, the following is a non-inclusive check list of situations that would not require an overwrite of the HTML.

If you make changes that will not affect the look of your application, you can specify “No” for this option. This could include:

  • Creating or modifying an Edit Code
  • Changing the logic of a calculation
  • Adding an External Object
  • Changing the way an application joins

However, there are some changes that do require you to specify “Yes” for this option, which will overwrite the HTML layer and any changes you have made within m-Painter. This could include:

  • Adding a new field and wanting it displayed to the screen
  • Changing the column headings descriptions in Field Settings
  • Reordering Fields
  • Adding/Deleting a prompted Record Selection
  • Adding a Field in a Maintenance program
  • Adding a Parameter calculation

There is a very useful tip that can save countless hours regarding overwriting the HTML Skeleton. If you have spent a long time in m-Painter for an application, you probably don’t want to overwrite the HTML. If you need to add a field, you can always add the field through the interface, but specify “No” to not overwrite the HTML. Then, open m-Painter. You will not see your field, but you can still include it by using the “Field” button in the toolbar:

Select the field you wish to include in the HTML and select the level. Even though you chose not to overwrite the HTML, the field is available to you because the back end Java code has been updated with this field’s definition. Additionally, if you need to Change column headings or reorder fields, you can do both of these things within m-Painter.

When to overwrite the XML

This question specifically addresses the Application Property XML file. This file controls things such as:

  • How many records to show on a page?
  • Should Advanced Sort or Advanced Search be turned on?
  • Should you do any case conversion within the SQL statement?
  • Specify the maximum numbers allowed for a dropdown list?
  • Should the Splash page be displayed for reports?
  • Etc.

There are only two times when this option must be set to “Yes”:

  • When you change Templates
  • When you make a mistake and forget how to correct it. Setting this back to “Yes” will return the Properties file to the default settings.

See also: When to Overwrite HTML/XML Flowchart

Created: May 16, 2012 | Modified: August 3, 2015