PSD1153 – SQL Grid View


This PhenixID Solution Document (PSD) is written for PhenixID Identity Manager (IM) 5.4.2 and above.

This view is used to show a result set from an sql query, with a possibility to add a user entered text to the search query. See below a screenshot.

System Requirements

  • PhenixID Identity Manager 5.4.2 or later
  • JDBC driver for the database to connect to
    Download driver from provider and put it in:
    [IM root folder]/customer/extension/lib


Download and extract

Add filter and JSP to IM Web

Add filter

Place the files SqlGridView.class and SqlGridViewProvider.class in
[IM root folder]/customer/extension/class/psd
If the /psd folder does not exist, then create one.


Place the file sqlGridView.jsp in
[IM root folder]/customer/extension/web/jsp/psd
If the /jsp/psd folder does not exist, then create one.


Add the view to

Open for the role that needs to see the view.
To add the view, add the view’s name psd.SqlGridView to the policy See example below where both new view and Main is available.

Policies to configure the view

All polices below should be placed in the role used.

When connecting to the SQL database, a driver is required. The jar-file containing the driver must be placed in [IM root folder]/customer/extension/lib. In this option, enter the full class name for the driver.

The URL for connecting to the SQL database. The URL has different syntax depending on the database type and the used driver, but it typically contain an IP address, a port and the name of the database.

The username for the database account used to read from the database.

The password for the database account used to read from the database.

The SQL query that will be used to populate the grid in the custom control. The query can contain a number of parameters that will be translated before the query is executed.

Use ##TEXT## to insert input from the search text box.

Use ##TODAY(yyyy-MM-dd)## to insert the current date/time in specified format. An instruction of how to get the desired format can be found in the javadoc for java.text.SimpleDateFormat.

The SQL query to run when the view is first loaded. This query can contain parameters of type ##TODAY()## as described above. If no initial query is specified, the view will be empty before any search is made.

The label for the search text field. If the policy is missing or empty, no label will be shown.

Example from with policies

SQL_GRID_VIEW_SQL_QUERY=SELECT whenSent, customername, recipient, broker, info, servername, transactionnr FROM SentMessages WHERE recipient = ‘##TEXT##’ order by whenSent DESC LIMIT 100;
SQL_GRID_VIEW_SEARCH_LABEL=Mobile phone number

Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID -