立即与支持人员聊天
与支持团队交流

Identity Manager 9.2.1 - Web Designer Reference Guide

The Web Designer editor Web Designer structures and functions The Web Designer object model Working with the Web Designer Web project configuration options Customizing the Web Portal Basics of Web Designer programming Compiling and debugging Monitoring Frequent tasks in the Web Portal

Managing a database-based collection

Working with a database based collection includes adding properties or object as well as removing and delete objects from a collection or database.

All important procedures for managing database-based collections are described below:

To add a proxy property to a database based collection

Proxy properties allow transparent use of database columns (base property) with modified metadata. Metadata includes:

  • Name

  • Description

  • Specifying a property as mandatory or optional

  • Structure for displaying the property value

  • Component selection for displaying and editing property values

You can modify a property within a component to match the requirements of the component exactly using proxy properties. Ensure the database of a proxy property is always the base property value. Updating the value through proxy properties always have additional effects on the base property.

  1. Right-click to select a collection.

  2. Select the Proxy property option.

    A proxy property is added under the selected collection node.

  3. In Node editor, select a property in the Base property menu.

  4. In the Identifier field, enter the name for the proxy property.

To add more proxy properties to a database based collection

  1. Right-click to select a collection.

  2. Select the Property option.

  3. Enter at least a name and data type for this property.

NOTE: Each object, which is in the collection at runtime, now has an additional property. You can handle this like a database based property, for example, to store temporary data.

To add a new object to a collection

  1. Right-click to select an action node.

    This could be the Initializer node of the component, for example.

  2. Select Paste and click the new node.

  3. In the Node editor view, select the required collection under Collection.

  4. Using the Filter condition property, enter an filter condition expression if you wish.

NOTE: Ensure the object is only added in the collection.

To modify a property in a database-based collection

In the steps below, the display value in Entry date in the Address Book is modified from <dd.MM.yy> to <yyyy-MM-dd>, as an example.

NOTE: The steps for this function can be used for the Child relation column and Foreign key relation column. For more information about these functions, see the One Identity Manager Web Designer Object Model Documentation.
  1. Log in to the Web Portal with your user information and select the Address Book view.

  2. Select the additional Entry date column, if it is not displayed, and look at the current display value.

    In our example, we presume that the <MM/DD/YY> display value is set.

  3. In the Address Book view, click the title and switch to the Web Designer.

  4. Open the Properties view and click to switch to the definition object in the definition tree view.

  5. Open the Collections node using and mark the Person data object.

  6. In the context menu, select the Object in extension > Modify property item.

    The display in the definition tree view switches to Configuration (custom).

  7. In the node editor view, in the Base property menu, select the EntryDate field and enter the new expression for the display value in the Expression for display values field.

    In our example, the following expression could be used.

    FormatDate(EntryDate, "yyyy-MM-dd")

  8. Switch to preview mode and re-compile the web application.

  9. Select the Address Book view and the additional Entry date column.

    In Entry date, the display value is yyyy-MM-dd.

To remove objects from the collection or delete them from the database

  1. Right-click to select an action node.

    This could be the Initializer node of the component, for example.

  2. Click Delete and select the new node.

  3. In the Node editor view, select the required collection under Collection.

  4. Perform one of the following tasks:
    1. Delete row only from collection under Delete type if you want to delete the object from the collection.

    2. Under Delete type, select the Delete database object and save option.

  5. Using the Filter condition property, enter an filter condition expression if you wish.

To save objects in the database

  1. Right-click to select an action node.

    This could be the Initializer node of the component, for example.

  2. Select the Save and click action and click the new node.

  3. In the Node editor view, select the required collection under Collection.

  4. Using the Filter condition property, enter an filter condition expression if you wish.

Loading database objects through relations

Data is linked in a database by relations to each other. You can use these relations to load data from the database in the simplest way.

Prerequisite for using such a collection is a collection containing source data.

There are different type of relations for defining a collection:

  • Defining with a foreign key relation:

    A foreign key relation helps automatically load those objects in a database view that were referenced by objects from another collection through a foreign key relation.

  • Defining with child relation:

    A child relation helps automatically load those objects in a database view that reference objects from another collection through a child relation.

To define a collection with a foreign key relation

  1. Open the module or component to which to add the collection.
  2. Select the Collections node by right-clicking on it.
  3. Select the Database view by foreign key relation menu item.
  4. In Source data collection, select the collection with the source data.
  5. In Foreign key column, select the foreign key column to create the relation to the target table.
  6. Enter the name for the new collection in Identifier.

You do not have to trigger loading for this type of collection. The moment the data is available in the source data collection, the foreign key referenced objects are automatically loaded.

To define a collection with a child relation

  1. Open the module or component to which to add the collection.
  2. Select the Collections node by right-clicking on it.
  3. Select the Database view by child relation option menu item.
  4. In Object type, select the database table from which to load the objects.
  5. In Source data collection, select the collection containing the objects to be referenced.
  6. In Child relation column, select the foreign key column to create the relation to the target table.
  7. Enter the name for the new collection in Identifier.

You do not have to trigger loading for this type of collection. The moment the data is available in the source data collection, the referenced objects are automatically loaded.

Loading database objects from multiple tables

For different use cases, it is necessary to examine database objects from multiple tables together. The special collection type Database objects from multiple tables in the object model is available for this.

To define a collection with the option "Database objects from multiple tables"

  1. Open the module or component to which to add the collection.
  2. Select the Collections node by right-clicking on it.
  3. Select the Database objects from multiple tables menu item.
  4. Enter the name for the new collection in Identifier.

    A collection like this is database based, but can accept objects from multiple database tables.

For more information, see "Database objects" as a collection. You must explicitly provide the database table from which the objects will be loaded.

Using the database query wizard

NOTE: You can use the database query wizard in a module or component of a collection or when you want to add a new module or component.

You cannot run SQL expressions directly in Web Designer for security reasons. Instead, this wizard helps you create SQL expressions that are stored in QBMLimitedSQL and linked to at least one permissions group in the QBMGroupHasLimitedSQL table. Your own collection node is added for the query.

To create a database query

  1. Perform one of the following tasks:
    1. In the navigation view, select a module or a component.
    2. Create a new module or component.
  2. In the definition tree view, mark the Collections node in the Object definition view and, in the context menu, select the Wizards > Database query wizard or the Object in extension > Wizards > Database query wizard menu item.

    NOTE: The navigation depends on whether you have selected a custom module/component or a default module/component. Default database objects first require an object extension. For more information, see Extensions.

    Wizard for creating or selecting a database query is displayed for an SQL expression to be entered or selected.

  3. Select the New option.

    This displays the following fields:

    Table 57: SQL expression settings
    Setting Description
    Collection name If necessary, overwrite the standard name for the collection that you are adding with this query.
    Identifier In this field, enter a unique identifier that is used later to identify the entry.
    SQL expression In this field, enter the entire expression. You can also declare parameters.
    Description In this field, enter an explanation of this expression. This makes it easier for other users to understand and classify this expression.
  4. Modify the settings, then click Next.

    Specify the dialog groups that can run the SQL snippet in Wizard for creating or selecting a database query. All dialog groups are selected.

  5. Specify the relevant dialog groups.
    • Disable the relevant dialog groups by double-clicking .
    • Disable Select all / deselect all to deselect all listed dialog groups and to enable the relevant dialog groups one by one.
    • Enable the relevant dialog groups by double-clicking .
  6. Specify the parameters you wish to select and set the values in the following Wizard for creating or selecting a database query page.
    • If necessary, disable parameter columns you do not want to include in the query or that were recognized by the parser as parameters but are not correct.
    • Disable Select all / deselect all to select all parameter columns individually.
    • To enter a value for the parameter, click next to the required parameter column.

    NOTE: You can check your database query with Test statement. As soon as the database processes running in the background are complete, you can test the new expressions.

    This display the Processing page and generates the new collection and SQL expression.

  7. Click Finish.

To select a database query

  1. Perform one of the following tasks:
    1. In the navigation view, select a module or a component.
    2. Create a new module or component.
  2. In the definition tree view, mark the Collections node in the Object definition view and, in the context menu, select the Wizards > Database query wizard or the Object in extension > Wizards > Database query wizard menu item.

    NOTE: The navigation depends on whether you have selected a custom module/component or a default module/component. Default database objects first require an object extension. For more information, see Extensions.

    The Wizard for creating or selecting a database query page is displayed and you can enter or select an SQL expression.

  3. Select the Existing option.

    This displays the following input and text fields.

    Table 58: Settings for an existing SQL expression
    Setting Description
    Collection name If necessary, overwrite the standard name for the collection that you are adding with this query.
    SQL snippet Select an existing fragment that you can use and modify in the SQL expression field.
    SQL expression In this text field, modify the selected snippet and the preset parameters if required.
  4. Modify the settings, then click Next.

    Specify the dialog groups that can run the SQL snippet in the following Wizard for creating or selecting a database query page.

  5. Specify the relevant dialog groups.
    • Disable the relevant dialog groups by double-clicking .
    • Disable the relevant dialog groups by double-clicking .
      NOTE: Dialog groups that have already been specified in a collection of a default module cannot be deselected.
    • Disable Select all / deselect all to select or deselect all listed dialog groups and to enable or disable the relevant dialog groups one by one.
  6. Specify the parameters you wish to select and set the values in the following Wizard for creating or selecting a database query page.
    • If necessary, disable parameter columns you do not want to include in the query or that were recognized by the parser as parameters but are not correct.
    • Disable Select all / deselect all to select all parameter columns individually.
    • To enter a value for the parameter, click next to the required parameter column.

    NOTE: You can check your database query with Test statement. As soon as the database processes running in the background are complete, you can test the new expressions.

    This display the Processing page and generates the new collection and SQL expression.

  7. Click Finish.
相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级