The Data List with Web Form maintenance template is a full-featured web application that allows users to both view their data, as well as modify it one record at a time.
The general use for this template allows end-users to display data in a grid format, with various action buttons. The action buttons include:
- Add a new row
- View an existing row
- Edit an existing row
- Copy an existing row
- Delete an existing row
By default, this template consists of two screens: One screen for listing rows in a grid, then a second screen to allow for maintaining rows. An optional parameter allows developers the option of combining these functions into one screen for increased usability. In essence, the Data List with Web Form template is the combination of the Data List Retrieval template and the Single Row Web Form Maintenance template.
Template Features
Below lists out all the template features offered by the Data List with Web Form maintainer.
Tables/Fields
Here you will see/modify the table you have selected for your application. Here you can create or modify joins to other tables as well. When tables are selected, only the primary table can be modified, by default. This is done to protect developers from accidental cascading changes. This behavior can be modified within the application properties.
To learn more about the Tables/Fields section, please see here.
Field Settings
Here you will find the settings for all the fields in the application. Maintainer templates have unique features that gives the developer methods of pre-formatted alternative inputs (simple dropdown lists, radio buttons, and checkboxes), form validation and auditing.
You can find out more in detail about these options here.
Dimensions
When building maintenance applications, a developer’s sequencing selection is analogous with selecting a Primary Key. This selection will tell m-Power how this table is unique. If the sequencing key(s) are not unique, then multiple records will be affected when a record is modified or deleted.
To learn more about Dimensions, please see here.
Filters
Filters can be created over any database fields or calculations. They allow you to restrict the records that will be returned from the database at runtime.
To learn more about Filters, please see here.
Calculations
Fields that will apply to the current application only. This can be used to include SQL code in a field, such as cast a numeric field as character, create date conversions, inserting the current date and time, and much more.
To learn more about Calculations, please see here.
External Objects
This feature allows developers to connect m-Power application with their current business logic, or to extend m-Power capabilities by allowing developers to write their own Java, RPG, or SQL programs, and integrating these programs into the applications. m-Power utilizes “locations” to connect the external objects, these locations vary depending on what the external object does and when it should be executed. The following locations are supported in this template:
*AFTERACT This location calls the object after a user either Adds, Updates, or Deletes a row.
*AFTERADD This location calls the object only after a user Adds a row.
*AFTERDLT This location calls the object only after a user Deletes a row.
*AFTERUPD This location calls the object only after a user Updates a row.
*BEFOREACT This location calls the object before a user either Adds, Updates, or Deletes a row.
*BEFOREADD This location calls the object only before a user Adds a row.
*BEFOREDLT This location calls the object only before a user Deletes a row.
*BEFOREUPD This location calls the object only before a user Updates a row.
*CALCOBJ This location calls the object for every row, after performing calculations.
*READRECRD This location calls the object for every row, before performing calculations.
*INITACT This location calls the object when the page loads, no matter the action mode.
*INITADD This location calls the object on page load, only when the user is Add mode.
*INITDLT This location calls the object on page load, only when the user is in Delete mode.
*INITUPD This location calls the object on page load, only when the user is in Update mode.
*REDIRECT This location is deprecated in this template.
*AFTADDRE This location is deprecated in this template.
*AFTDLTRE This location is deprecated in this template.
*AFTUPDRE This location is deprecated in this template.
*FLDVALID This location calls the object to validate fields before every action.
To learn more about External Objects, please see here.
Smartlinks
Smartlinks allow developers to easily link one application (Retrieval, Report, or Maintenance) to any other application, passing key data automatically. The benefit of Smartlinks is that it allows users the ability to quickly “drilldown” into other applications based on the selected row. By passing parameters automatically when creating a link in m-Painter, Smartlinks save the developer time by simplifying the process.
To learn more about Calculations, please see here.
Template Properties
The Template Properties screen gives developers template specific settings. The Data List with Web Form template has specific property of creating a Parent/Child combo application.
To learn more about Template Properties, please see here.
Workflow Designer
The Workflow Designer is unique to maintainer templates and lets you configure actions that you would like to trigger when a record is added, updated, or deleted from this application.
To learn more about the Workflow Designer, please see here.
Edit Properties
The Edit Properties section allows you to control the behavior of the application. Every m-Power application has properties, however the list of available properties will be different depending on the template selected.
- Program Options – Maintenance Options
- Program Options – Other
Maintainer Page Layout — Controls if the maintainer form appears on the same page as the retrieval listing or on separate pages. The form and list on separate pages is the default property.
File Upload Directory — If utilizing the file upload to server feature, this is where you specify the upload directory on the m-Power server.
File Upload Auto Rename — If the uploaded file already exists in the specified directory on the server, the file will be overwritten or the filename will be renamed to ‘file(1).ext’, ‘file(2).ext’, etc.
File Upload Max Size — Maximum size of file to be uploaded (in Mb).
Maintain Joined Tables? — Determines if joined secondary tables can be maintained or not. Determines if joined secondary tables can be maintained or not. Maintain primary table only is the default property.
Add Action Mode — Controls if the add action mode is allowed and if duplicate records should be allowed.
Update Action Mode — Controls if the update action mode is allowed.
Delete Action Mode — Controls if the delete action mode is allowed.
Delete Confirmation — Determines if a confirmation message appears before deleting a record.
View Action Mode — Controls if the view action mode is allowed
Skip Database Actions — Controls if maintainer should skip database actions (add, update, and delete). Often enabled when using the maintainer to store an external object.
CSRF Prevention? — Enables use of a token on POST requests for CSRF Prevention. More info can be found here.
Data List Display Type — This template contains two HTML presentation pages that can be used as the default data listing. The table list view will display records in a traditional table list. The responsive detail view will display records in an abbreviated list on the left with a corresponding single row view on the right. It is also responsive to mobile devices.
Use Responsive Detail on Mobile — When running the application from a smartphone or tablet, this property determines whether the default data list table or the responsive detail view HTML presentation should be displayed.
URL Parameters
A complete list of runtime parameters that can be passed to a Data List with Web Form template can be seen by using Parameter Listing (help=1) tool.
To launch this feature, simply add ?help=1 to the end of the URL of any m-Power application and hit Enter.
ex. http://mpowerserveraddress:8011/mrcjava/servlet/DICTIONARY.M00010s?help=1
For more information on the Parameter Listing tool, please see here.