Enabling run-time data object editing

Give users control over data by providing them with the tools they need to maintain up-to-date records. The record editor gadget helps your users change, add, and delete data at run time, which reduces maintenance effort and improves the usability of the application.

Note: The record editor gadget cannot be used in New, Review, and Perform harnesses.

To add the record editor gadget to your application, you must first create and configure a special pxRecordsEditor section, and then embed the section in the target UI.

Before you begin: Create a report definition in the class of the target data object. Do not use summary functions or parameters. For more information, see Creating a report definition.
  1. In the header of Dev Studio, click Create > User Interface > Section.
  2. On the Create Section tab, specify a label, context, class, and ruleset for the section, and then click Create and open.
  3. If the editing options are not visible, click Convert to full section editor.
  4. On the Design tab, from the Structural list, drag Embedded section onto the design canvas.
  5. In the Section Include window, in the Section field, enter pxRecordsEditor, and then click Submit.
  6. In the embedded section, click the View properties icon.
  7. On the General tab, in the Page Context list, select the page context for the embedded section.
  8. On the Presentation tab, in the Edit Options list, select an edit mode for the control.
    Note: This edit mode takes precedence over section and harness settings.
  9. On the Parameters tab, define the data source that you want to associate with the editor:
    1. In the Data Source Class Name field, enter the class name of the target data object.
    2. In the Report definition Name field, enter the name of the report definition rule that you want to use to fetch the data for this section.
    3. Optional: In the Report Page Name field, enter the name of the top-level page for the virtual report definition that you want to use to fetch the data for this section. The page must belong to the Rule-Obj-Report-Definition class and contain the metadata of a valid report definition rule.
      If you enter values for both the Report Page Name and Report definition name fields, the system uses the value of the Report Page Name field to populate the data for this section. You can use this field to distinguish between multiple record editor sections in the same harness, or to enable users to update the virtual report definition at run time.
    4. Optional: To enable importing and exporting data in .csv files, select Show import and export.
    5. Optional: To enable search, select Show search.
    6. Optional: To configure the record editor to perform searches against a global search index, select Use full text search.
    7. Optional: To hide the Add record button, select Hide the add option.
      Regardless of this setting, the Add record button is always hidden for work records.
    8. Optional: To hide the Delete button, select Hide the delete option.
      Regardless of this setting, the Delete button is always hidden for work records.
  10. Click Submit to save your changes.
  11. Click Save.
What to do next: Add the section to the user interface.