Chatta subito con l'assistenza
Chat con il supporto

Identity Manager 9.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

Presets for grouping grids

You can use a simple code snippet to preset grouping of grids.

To preset grouping of grids

  1. In the Web Designer, activate the Extended properties property on the grid node.
  2. On the grid node, under the Extended properties entry, insert a new node of the type Code snippet.
  3. For the new node, select the Code property and edit the value.
  4. Enter the following source text:

    var dataSource = GridBand1.DataSource;

    var col = dataSource.Table.GetColumn("UID_Department");

    if (!dataSource.GroupingColumns.Contains(col))

    dataSource.GroupingColumns.Add(col);

NOTE: Ensure that you select the identifier for GridBand1, the grid level and the column name for UID_Department that you want to group by.

Visualizing exceptions in the Web Portal

Error messages or exceptions triggered in the database layer (for example, format scripts on database columns) are displayed in a general error message in the Web Portal because exceptions normally contain too much technical detail for the end user.

If a custom error text is displayed in the Web Portal, the script must trigger an exception with exactly the same relevance for the end user. You have the following options.

  • End user
  • Default
  • Intermediate
  • Technical

NOTE: However, exceptions are always saved in full in the Web application log, regardless of the relevance for the end user.

Example of format script on a database column that cannot end with a period
If Value.ToString().EndsWith(".") Then
Throw New ViException(#LD("This property may not end in a period sign.")#, ExceptionRelevance.EndUser)
End If

Replacing images in resource files

You can replace images that are in kept as compiled resources in one of the files VI.ImageLibrary.dll or WebDesigner.ImageLibrary.dll with project files.

NOTE: It is not possible to use replaced images on the login page if the web application is running against an application server.

NOTE: Before you can replace an image, you must determine the image to be replaced and its associated information, such as, source, file name, and, if necessary, size, and status.

Find source

There are different ways to obtain more information about an image's properties. You can, for example, find the required information about the image URL. Use the property view to determine the correct source. You can recognize the source VI.ImageLibrary by the name stockImg. The name Img stands for the source, WebDesigner.ImageLibrary.

Find file

You can also find the name of the image file through the image URL. The file name is directly after the source and could look like:

stockImg=AssignedDirect

Find size

This value is only required for file from the VI.ImageLibrary.Images source. You obtain the value through the image URL. The value could look like this:

size=Small

find state

The state is only relevant for image files from the VI.ImageLibrary.Images source. This value can also be found from the image URL. The state could look like this:

state=Normal

There are different rules for the file names of both types of resource file, which are explained separately in the following:

Rules for file names of images from a VI.ImageLibrary.dll.

Resources are stored with the following name format in the VI.ImageLibrary.dll file:

VI.ImageLibrary.Images.<Größe>.<image name> <Pixel> <Status> p.png

For example:

VI.ImageLibrary.Images.Small.DeleteDocument 16 n p.png

The values for <Size> and <Pixel> of a resource file must match.

Table 70: Possible values for size and pixels
<size> <pixel> Description
Small 16 Image in 16x16 pixels
Medium 24 Image in 24x24 pixels
Large 32 Image in 32x32 pixels

This resource state can have the following values:

Table 71: Resource state values
<state> Description
d Not set
n Normal
h "Highlighted", emphasized color
IMPORTANT: This URL is case-sensitive.
Rules for file names of images from a WebDesigner.ImageLibrary.dll.

Resources are stored with the following name format in the WebDesigner.ImageLibrary.dll file:

VI.WebDesigner.ImageLibrary.<image name>.png

For example:

VI.WebDesigner.ImageLibrary.filter-small.png

To replace an image from a resource file

  1. With suitable software if necessary, identify the name of the image you want in the resource file.

    There are different name format depending on which resource file is being dealt with.

  2. Create a project file with the same name in the Web Designer and save it.

NOTE: Ensure that images from resource files can be cached in the browser if necessary.

Settings for improved accessibility

Web Designer offers setting options for barrier-free access to the Web Portal. To protect the compatibility of existing installations, these settings must be applied explicitly. You can use the VI_GetWebSettings script for this. The VI_GetWebSettings script is called up after each successful login, as long as this script is defined in the system. The script returns several key/value pairs that can enable specific settings. These settings only apply to the current session for which you have been authenticated. Different configurations can be implemented depending on the current user.

The following keys and values can be used.

Table 72: Possible settings
Key Value type Description
BaseCssClass String

Values:

  • imx-highaccessibility: Enables CSS rules for improving accessibility.

  • imx-highcontrast: Enables high contrast mode.

TIP: You can enter several values delimited by a space character.

GridGroupByDisabled Bool If the value is true, no grouping will be offered in the grid.
GridResizeDisabled Bool If the value is true, no column width modification will be offered in the grid control.
EnableHighAccessibility Bool If the value is true, the controls are displayed with increased accessibility.

The following example scripts tries to show how the settings should be made.

Public Function VI_GetWebSettings() As System.Collections.Generic.Dictionary(Of String, Object)

Dim settings As New System.Collections.Generic.Dictionary(Of String, Object)

 

settings.Add("GridGroupByDisabled", True)

settings.Add("GridResizeDisabled", True)

settings.Add("BaseCssClass", "imx-highaccessibility")

 

 

' return settings

VI_GetWebSettings = settings

 

End Function

Related Documents

The document was helpful.

Seleziona valutazione

I easily found the information I needed.

Seleziona valutazione