Search Panel Configuration

This chapter provides details on some selected configuration options of the search panel. For other options refer to the Web Center Reference Guide.

Filter Attributes

The list of filter attributes for a search panel is configured as part of the tiles definition of the corresponding entry list.

The tiles property with name “attributes” contains the list of filter attributes, separated by semicolons.

Each attribute includes up to four items, separated by colons:

  • The LDAP attribute name.

  • The message key for the attribute label; the default key is “ldap.attribute.<attribute name>”.

  • The attribute type.The type determines the filter operands to be applied to this attribute, like “equals” or “beginsWith”, and defines the way in which the filter values can be entered or selected.The supported types include:

    • General types

      • date – for date attributes without time like a user’s start date, with day regarded as GMT day.

      • day – like date, but with day extending from GMT start of day -12 hours to GMT start of day + 12 hours.

      • time – for date attributes with time, like the time until which a user account is locked out.

      • number – for attributes with numeric values.

      • noSubs – for attributes which do not (or should not) support filtering by substrings.

      • sublink – for filtering by an attribute of a link, while restricting the set of all links to a specific subset. For details, see the section “Filtering by Link Attributes”.

    • Specific types for attributes with fixed value sets, like:

      • bool – for Boolean attributes (yes/no)

      • accountType – for account attribute dxrType (personal/privileged)

      • contextType – for context attribute dxrType (category/general)

      • projectType – for project attribute dxrType (like Consulting)

      • dxrState – for account or group attribute dxrState (like ENABLED)

      • dxrTsState – for account or group attribute dxrTsState (like ENABLED)

      For details, see the section “Filtering by Attributes with a Fixed Value Set”.

    • Types for attributes with proposal lists, like a user’s risk level. For details, see the section “Filtering with Proposal Lists“.

  • The visibility flag: true for visible, false for hidden. This can be an expression evaluated at run time. Filter attributes are visible by default.

Filtering by Attributes with a Fixed Value Set

The Web Center search panel supports searching for attributes with a fixed value set, like Boolean attributes or attributes whose values are provided by a static proposal list.

Web Center provides some predefined sets like “bool” for boolean attributes represented as “Yes” and “No”, or “accountType” with values “Personal” and “Privileged”.

For a new value set, first choose an identifier for the list, then assign localized values for each supported language, and finally assign the list to one or more search filter attributes.

Note that localized proposal lists provide an easier and better way to achieve the same. (See the next chapter for details.)

Defining the Localized Values

The set of localized values is defined as a sub-object of object “messages.texts” in Javascript file resources/build/messages/<language>/messages.js. The sub-object’s name is the value list identifier.

Each sub-object maps the values to their localized representations. The localized values must be enclosed in single or double quotes. You can spare the enclosing quotes around the value list name and the values themselves as long as they don’t conflict with reserved Javascript identifiers or other Javascript code.

Sample:

messages.texts = {
	accountType: {
		Personal : "Personal",
		Privileged: "Privileged"
	},
	bool: {
		'TRUE'  : "Yes",
		'FALSE' : "No"
	},
	…
}

Configuring the Search Filter Attribute

The filter attribute is configured in the search form’s Tiles definition by its name, followed by two colons and the value list identifier.

Sample:

<definition name=".accountsForm"
            path="/WEB-INF/jsp/view/tiles/objectList.jsp">
    <put name="action" value="/getAccounts.do"/>
    <put name="attributes"
         value="cn;dxrIsPrimary::bool;dxrType::accountType;…"/>

Filtering with Proposal Lists

The Web Center search panel supports searching for attributes whose values are provided by a localized or non-localized proposal list. The proposal list can be static or dynamic, of type String or DN. The list should be of a reasonable size in order not to cause performance issues.

Configuring the Search Filter Attribute

The filter attribute is configured in the search form’s Tiles definition by its name, followed by two colons and the proposal list identifier. The identifier is the concatenation of object type (from file objects-config.xml), property name and the string “proposals”, separated by dots, for example “dxrSalutation::dxrUser.dxrSalutation.proposals”.

Sample:

<definition name=".usersForm"
            path="/WEB-INF/jsp/view/tiles/objectList.jsp">
    <put name="action" value="/getUsers.do"/>
    <put name="attributes"
         value="cn;dxrSalutation::user.dxrSalutation.proposals;…"/>

The Web Center search panel supports searching for attributes that reference other objects, like user manager or role owner.

Let’s say you want to search for all groups whose owner has a surname starting with “ab”. Then Web Center first searches for possible owners, that is for users whose surname starts with “ab”. Then it searches for all groups whose owner matches one of the users found.

Be aware that the first search may hit a size or time limit. The returned list of possible owners is then probably incomplete. The final result will then contain only groups with owners in the incomplete list.

Sometimes one wishes to restrict the set of referenced objects to a specific subset. For example, users might want to filter their task list by the name of the privilege that is the task resource but only if the resource is a role. This can be done by assigning the type sublink to the search attribute.

Configuring the Search Filter Attribute

The filter attribute is configured in the search form’s Tiles definition by its name, followed by an at sign and the name of the attribute of the linked objects, for example “owner@sn”.

Searching by the owner’s surname:

<definition name=".groupsForm"
    path="/WEB-INF/jsp/view/tiles/objectList.jsp">
    <put name="action"     value="/getGroups.do"/>
    <put name="attributes" value="cn;description;owner@sn;…"/>
…/>

Searching by the manager’s surname or given name:

<definition name=".usersForm"
    path="/WEB-INF/jsp/view/tiles/objectList.jsp">
    <put name="action"     value="/getUsers.do"/>
    <put name="attributes" value="cn;sn,gn;manager@sn,manager@gn;…"
…/>

Searching by the owner’s or role administrator’s surname:

<definition name="rolesForm"
    path="/WEB-INF/jsp/view/tiles/objectList.jsp">
    <put name="action"     value="/getRoles.do"/>
    <put name="attributes"
         value="cn;owner@sn,dxrRoleAdmin@sn:ownerOrAdmin;…"
…/>
You must configure attribute dxrRoleAdmin in file WEB-INF/config/filters-config.xml, and you must assign a label for the search filter attribute to key ownerOrAdmin in message file text.properties.

Filtering the task list by the name of roles that are task resources:

<definition name=".worklistForm"
    path="/WEB-INF/jsp/view/tiles/objectList.jsp">
    <put name="action"     value="/getUsers.do"/>
    <put name="attributes"
         value="dxrResourceLink.role@cn:
                requestwf.workflow.resource.role:sublink;…"
…/>

Configuring the Search for the Linked Objects

You can define some individual and some general options for the search for the linked objects. The details are described in chapter “User Interface Configuration / Search Filter Configuration” of the Web Center Reference Guide.