Controlling the Look and Feel in a UTS Data Source Project

Note: This topic only applies if your Data Source Project is an OS 2200 UTS application.

The look and feel of an .aspx or .cshtml file created from a UTS data source project can be modified using the UTS editor or Visual Studio web editors. Refer to Controlling the Look and Feel using Visual Studio Web Editors.

To modify the display preference for the input fields

Modifying the default properties of the input fields that were generated when the screen was captured, gives the presentation build process information to generate appropriate markups for the input fields on the new page.

  1. In Solution Explorer, browse to the Server Messages folder under the data source project, and double-click the appropriate .utsxml file to open it in the editor.

  2. On the <name of the server message>.utsxml tab, right-click an input field and click Properties.

  3. In the Properties window, change any of the available properties for the field. For instance, a field that currently has the ControlStyle property set to TextBox might be changed to a ControlStyle of CheckBox, if the field only has two possible values. Alternatively, such a field might be changed to a ControlStyle of RadioButtonList if the expected input value has only a few options, or to a ControlStyle of DropDownList if the expected input value has many options.

  4. If you set the ControlStyle property to CheckBox:

    1. Set the CheckedValue property to the value that the OS 2200 application expects, when the check box is checked.

    2. Set the UncheckedValue property to the value that the OS 2200 application expects when the check box is not checked.

  5. If you select RadioButtonList, DropDownList, LinkButtonList, ButtonList, or ListBox for the ControlStyle property, do the following to identify the various selections. Refer to UTS Field Property Descriptions for descriptions of the properties and their values.

    1. Click Items, and click the selection button on the right.

    2. In the Choice Collection Editor dialog box, click Add, update DisplayValue with the text that describes the selection, and update SendValue with the value that the OS 2200 application is expecting.

    3. Repeat the previous step for each possible selection.

    Note: The existing text is removed when creating the look and feel of the new presentation.

  6. Repeat steps 2 through 5 for each field that requires any display preference changes.

  7. Click File then click Save to save your changes.

  8. For Web Forms or Web Forms Mobile presentation projects, if you have one or more presentation projects that have already been built, you may need to reconcile your changes to the message with any ePortal-generated .aspx files. In this case, the Save Message Dialog appears.

    Refer to Creating Web Forms Application Projectsfor more information.

    Refer to Creating Web Forms Mobile Application Projects for more information.

  9. For Scaffolded presentation projects, if you have one or more presentation projects that have already been scaffolded, you may need to reconcile your changes to the message with any ePortal-generated presentation files.

    Refer to Reference Information for Scaffolded Projects for more information.

    Refer to Reconciling Client Message Changes to Scaffolded Presentation Projects for more information.

Refer to also: Markup Template Editor

Applications that Use Function Keys

Some UTS applications require function keys, for example, F1 through F22, to operate properly. To handle this situation, the client message and server message contain the special field _KeySequence. You use _KeySequence to send keystrokes, such as function keys, to the application. Refer to the topic Programming Keystrokes for T27 and UTS Applications for more information.

If your application requires function keys, perform one of the procedures below, depending on your situation.

You have many pages that use the same function keys (for MVC Web Presentations).

To handle this case, you should use one of the layout files specifically designed for UTS projects that use function keys, either _LayoutUts.cshtml or _LayoutAjaxUts.cshtml. Refer to Modifying the Layout Page for more information on the layout files.

You have many pages that use the same function keys (for Web Forms and Web Forms Mobile Presentations).

To handle this case, you can define the most typical function key case on the template used by the web page generator, and then edit individual pages that differ.

Perform the following procedure:

  1. Before building your web forms or mobile presentation project, edit the appropriate template file.

    • If you are using master pages, edit the ContentFormTemplate.aspx file. Refer to the topic Modifying the Master Page for more information.

    • If you are not using master pages, edit the WebFormTemplate.aspx file. Refer to the topic Modifying the Web Form Template for more information.

  2. With the template file in the editor, click the Design button to change to design mode.

  3. Add one or more controls to the template to represent the function keys.

    • For a mobile presentation, use the mobile control TerminalKeysCell. Refer to the topic ePortal Developer Controls for Web Forms Mobile Projects for more information.

    • For a web forms presentation, you can use the control ePortalTerminalKeys. Alternatively, you can use an ePortalButton control to represent each function key. If you use a series of ePortalButton controls, you must manually set the AssociateControl property to _KeySequence for each button. Refer to the topic ePortal Developer Controls for Web Forms Projects for more information.

  4. Save the updated template file.

  5. Build the solution to generate the web pages for your presentation project.

  6. If any pages use different function keys from what you defined in the template, edit the individual pages to add, delete, or modify function key settings, as needed. Refer to the topic Controlling the Look and Feel using Visual Studio Web Editors for more information.

You have a small number of pages using function keys, or they are all different.

To handle this case, you can edit the client message (or server message), and change ControlStyle for the _KeySequence field to match the type of control that you want to use.

For example, you could change the ControlStyle from the default value of Hidden to ButtonList. In this case, you would edit the ListItems to list all applicable function keys. Refer to the topic Controlling the Look and Feel in All Data Source Projects for more information.