Control
Objects
The Controls tab features
objects that allow you to issue
commands and update variables
that may be used to control other objects in the display. The sample display file controls.rtv
(located in demos/tutorials) features information on working
with objects from the Controls tab.
The value,
valueString
and selectedValue properties allow you to set the value for the
controls. The varToSet property allows you to update the attached
variable with the value from the control.
The actionCommand
property allows you to set up a command which will be executed from the
control. This actionCommand can reference the value from the
control by using the keyword $value.
To enable selecting, moving and
editing the controls without activating the associated action command, the
controls are not active in the main window of the Display Builder.
The tabIndex property allows you to define
the order in which table and control objects will receive focus when navigated
from your keyboard. Initial focus is given to the object with the smallest
tabIndex value, from there the tabbing order proceeds in ascending order. If
multiple objects share the same tabIndex value, then initial focus and
tabbing order are determined by the alpha-numeric order of the object names.
Objects with a tabIndex value of 0 are last in the tabbing order. NOTE:
The tabIndex property does not apply to Slider objects or objects that
are disabled, invisible, or have a value of less than 0.
To preview a control object in the
Display Builder, save your file and click the Preview button
in the toolbar. Your display opens
in a Preview Window that allows you to activate control objects. The Preview
button becomes disabled when you edit your display. Save your display again to
enable it.
Some control object properties cache their colors and therefore do not update
when a custom color definition
changes. You will need to either to restart Enterprise
RTView or reload the display to see the color change for these objects.
The Controls tab features the following objects:
Text Entry Fields |
There are three text entry
fields to choose from. The first allows you to enter numeric or text information.
Attach your data to valueString to update the value shown in this
text entry field from your data.
The second text entry field
accepts only numbers without decimal points and the third allows numbers
with decimal points. Attach your data to value to update the values
shown in these text entry fields from your data.
The actionCommand
is executed and the variable attached to varToSet is updated
with the data you typed into the text entry field when you press <Enter>
and, if the executeOnFocusLostFlag is selected, when the text entry
field loses focus. To disable text entry, deselect the editableFlag
checkbox. If the editableFlag is off and enabledFlag is on,
the mouse and arrow keys can still be used to move the cursor.
If the executeOnKeystrokeFlag checkbox
is selected, then each keystroke that modifies the text field will set the
varToSet variable and execute the actionCommand, if applicable, using
the modified text. NOTE: In a Thin Client deployment there may be a delay
between the keystroke and the response, depending on the speed of your network
and server.
To set the bgColor and fgColor
properties of a text entry field, click on the
button and choose a color from the palette. The bgColor property sets the
color of the object's object's background area and the fgColor property
sets the color of the text. When bgColor and fgColor properties are set to
Default, then the text entry field will adopt default settings for background and foreground
colors. For example, in the Display Viewer the text entry field in your display will adopt a standard Java appearance. When that same display is viewed via
Thin Client Browser, the text entry field will conform to that browser's color preferences.
Use the valueTextAlignX property to set text
alignment: Left, Center or Right. NOTE: The selected
alignment can only be applied if the length of the text is less than the length
of the text entry field. Use the
mouseOverText property to enter a tool tip for
this control. To
display the tool tip, move your mouse over the object. To enter a multi-line
tool tip, use \n to delimit the lines (e.g. control\nobject). NOTE:
The object must be visible (i.e. visFlag property is selected), in
order for the tool tip to be visible. |
Text Area Object
|
The text area control supports display and entry
of multi-line text with optional word wrap. Scrollbars will appear as needed.
Attach your data to valueString to update the value shown in this text
area from your data.
The actionCommand is executed and the
variable attached to varToSet is updated with the data you typed
into the text area control when the text area control loses focus. To disable
text entry, deselect the editableFlag checkbox. If the editableFlag
is off and enabledFlag is on, the mouse and arrow keys can still be used
to move the cursor.
If the executeOnKeystrokeFlag checkbox is
selected, then each keystroke that modifies the text area will set the
varToSet variable and execute the actionCommand, if applicable, using
the modified text. NOTE: In a Thin Client deployment there may be a delay
between the keystroke and the response, depending on the speed of your network
and server.
To set the bgColor and fgColor
properties of a text area object, click on the
button and choose a color from the palette. The bgColor property sets the
color of the object's background area and the fgColor property sets the
color of the text. When bgColor and fgColor properties are set to
Default, then the text area control will adopt default settings for background and foreground
colors. For example, in the Display Viewer the text area control in your display will adopt a standard Java appearance. When that same display is viewed via
Thin Client Browser, the text area control will conform to that browser's color preferences.
Use the mouseOverText property to enter
a tool tip for this control. To
display the tool tip, move your mouse over the object. To enter a multi-line
tool tip, use \n to delimit the lines (e.g. control\nobject). NOTE:
The object must be visible (i.e. visFlag property is selected), in
order for the tool tip to be visible. In the Display Viewer, pressing the <Tab> key
inside a text area control will inserts a tab character in the text. To move the
keyboard focus away from a text area control, either click outside of the
control or press <Ctrl-Tab>. In the Display
Viewer Applet, pressing the <Tab> key inside a text area will move the keyboard
focus. |
Button |
The actionCommand
is executed and the variable attached to varToSet is updated
with the value from the valueToSet property when you click on the
button.
Use the hotKey property to enable keyboard
activation on a button. Assign an
alphanumeric value (A-Z or 0-9) to be used on the keyboard with the Alt key. The button is
activated when the panel it resides in has focus and the user holds down the Alt key
and simultaneously selects the assigned value on the keyboard. For example,
Alt+B, where B is the assigned key.
When keyboard activation is enabled and the
defaultButtonFlag is selected, a button can be activated by pressing the
<Enter> key. In the display, the activated button will be highlighted with
an extra border. While multiple objects in the display can have the
defaultButtonFlag selected, it will only apply to first one added to the
display. NOTE: The
defaultButtonFlag property does not apply to objects that are disabled or
invisible. If you are viewing the Display Server in Firefox, another
control object must have focus when the <Enter> key is pressed in order
for the button to be activated. To set the bgColor and fgColor
properties of a button, click on the
button and choose a color from the palette. The bgColor property sets the
color of the object's background area and the fgColor property sets the
color of the text. When bgColor and fgColor properties are set to
Default, then the button will adopt default settings for background and foreground
colors. For example, in the Display Viewer the button in your display will adopt a standard Java appearance. When that same display is viewed via
Thin Client Browser, the button will conform to that browser's color preferences.
Use the mouseOverText property to
enter a tool tip for this control. To
display the tool tip, move your mouse over the object. To enter a
multi-line tool tip, use \n to delimit the lines (e.g. control\nobject).
NOTE: The object must be visible (i.e. visFlag property is
selected), in order for the tool tip to be visible. |
Checkbox |
Attach your data to the
value
property to update the value displayed by the checkbox. If the value of your
data attachment equals the valueToSetChecked property, the checkbox will
be selected. Default values for valueToSetChecked is 1 (On) and for
valueToSetUnchecked is 0 (Off). The
actionCommand is executed and the variable attached to varToSet is
updated when you click on the checkbox. If clicking on the checkbox selects it,
then varToSet will be updated with the value of valueToSetChecked.
If you click on the checkbox and it does not become selected, varToSet
will be updated with the value of valueToSetUnchecked.
Use the mouseOverText property
to enter a tool tip for this
control. To display the tool tip, move your mouse over the object. To
enter a multi-line tool tip, use \n to delimit the lines (e.g.
control\nobject). NOTE: The object must be visible (i.e. visFlag
property is selected), in order for the tool tip to be visible.
|
Radio Button Group |
Use the radioListValues
property to specify the labels and values for each radio button (e.g.,
Low,25;Medium,50;High,75), or make a data attachment to a two-column table.
When attaching to a table, the first column is used for the radio button
labels, the second column is used for radio button values. If only labels
are specified, they will also be used as values. Specify which radio button
is selected using the selectedValue property.
The orientationMode
property specifies how radio buttons are populated, horizontally (by row)
or vertically (by column). Specify the width, in pixels, of the space between
radio buttons using the horizontalGap and verticalGap properties.
The actionCommand
is executed and the variable attached to varToSet is updated
with the selected value when you select a previously unselected radio button
from the group.
Use the mouseOverText property
to enter a tool tip for this
control. To display the tool tip, move your mouse over the object.
To enter a multi-line tool tip, use \n to delimit the lines
(e.g. control\nobject). The object must be visible (i.e. visFlag
property is selected), in order for the tool tip to be visible.
NOTE: In a Thin Client deployment, multi-line and non-static tool
tips are not supported. |
Slider |
The valueMin and
valueMax
properties control the range of values for the slider. Attach your
data to the value property to update the value displayed by the
slider from a data attachment.
The actionCommand
is executed and the variable attached to varToSet is updated
with the value from the slider when you release the slider thumb after
dragging it or when you click on the slider to advance the thumb one unit.
Select the updateWhileAdjustingFlag to receive updates while dragging
the slider thumb.
Use the mouseOverText
property to enter a tool tip for
this control. To display the tool tip, move your mouse over the
object. To enter a multi-line tool tip, use \n to delimit
the lines (e.g. control\nobject). NOTE: The object must be visible
(i.e. visFlag property is selected), in order for the tool
tip to be visible. |
List Box
|
Use the listValues
property to specify the labels and values for each radio button (e.g.,
Low,25;Medium,50;High,75), or make a data attachment to a two-column table.
When attaching to a table, the first column is used for the radio button
labels, the second column is used for radio button values. If only labels
are specified, they will also be used as values. To set the selected list
item from a data attachment, attach your data to the
selectedValue property.
The actionCommand
is executed and the variable attached to varToSet is updated
with the selectedValue when you chose a previously unselected item from
the list box.
To set the bgColor and fgColor
properties of a list box, click on the
button and choose a color from the palette. The bgColor property sets the
color of the object's background area and the fgColor property sets the
color of the text. When bgColor and fgColor properties are set to
Default, then the list box will adopt default settings for background and foreground
colors. For example, in the Display Viewer the list box in your display will adopt a standard Java appearance. When that same display is viewed via
Thin Client Browser, the list box will conform to that browser's color preferences.
Use the mouseOverText
property to enter a tool tip
for this control. To display the tool tip, move your mouse over
the object. To enter a multi-line tool tip, use \n to
delimit the lines (e.g. control\nobject). NOTE: The object must
be visible (i.e. visFlag property is selected), in order
for the tool tip to be visible. |
Combo Box |
Use the listValues
property to specify the labels and values for each radio button (e.g.,
Low,25;Medium,50;High,75), or make a data attachment to a two-column table.
When attaching to a table, the first column is used for the radio button
labels, the second column is used for radio button values. If only labels
are specified, they will also be used as values. To set the selected menu
item from a data attachment, attach your data to the selectedValue property. Check the textEditEnabledFlag to allow the user
to type a selection in addition to selecting from the drop down menu.
The actionCommand
is executed and the variable attached to varToSet is updated
with the selectedValue when you choose a previously unselected item from
the drop down menu or type a new item into the text entry area of the combo
box.
To set the bgColor and fgColor
properties of a combo box, click on the
button and choose a color from the palette. The bgColor property sets the
color of the object's background area and the fgColor property sets the
color of the text. When bgColor and fgColor properties are set to
Default, then the combo box will adopt default settings for background and foreground
colors. For example, in the Display Viewer the combo box in your display will adopt a standard Java appearance. When that same display is viewed via
Thin Client Browser, the combo box will conform to that browser's color preferences.
Use the mouseOverText
property to enter a tool tip
for this control. To display the tool tip, move your mouse
over the object. To enter a multi-line tool tip, use \n
to delimit the lines (e.g. control\nobject). NOTE: The object
must be visible (i.e. visFlag property is selected), in
order for the tool tip to be visible. |
Date Chooser |
Use the selectedValue
property to specify an initial date value. The
maximumDate and minimumDate properties control
the selectable dates in the popup calendar. It is
recommended that initial date you specify is within the
maximumDate/minimumDate value range so that the
user will not have to navigate to a valid date.
The actionCommand
is executed and the variable attached to varToSet is updated
with the selectedValue when either the
user selects an date from the popup calendar or, if
the date is typed in, when the user presses <Enter> or
clicks out of the field.
The dateFormat
property controls both the input of a date typed into a
field, as well as the output to a local variable or action
command. If dateFormat is not specified, then a locale
dependent format will be used. When users mouse-over the
text entry field, a tooltip will display the specified
dateFormat so they will know which format to enter.
Since the dateFormat
controls both the input and the output of the Date chooser,
information not included in the dateFormat will be
lost. For example, if the date format is MMMM dd, yyyy (e.g.
January 01,2000), and the timeEntryEnabledFlag is
selected, even if you enter a time it will not be stored
since it was not included in the specified dateFormat.
Or, if the specified dateFormat does include the time
(e.g. MM/dd/yyyy hh:mm) and the time you entered was PM, it
would be stored in the AM since am/pm was not specified in
the dateFormat and AM is the default.
The dateFormat should
be specified using format specifiers from the
SimpleDateFormat class. The dateFormat property
does not support backslashes (\). In the Display
Viewer Applet, the text entry field validates the date
string as you enter it. It is very strict about allowing
only dates in the format specified. In the Display Server
the parsing is more flexible, but not guaranteed unless the
date entered is in the same format as the specified
dateFormat. NOTE: In the Display Server, the text entry
field is not validated and the following format specifiers
are not supported: G, w, W, D, F, E, k, K, S,
z, Z.
The timeEntryEnabledFlag
property controls the visibility of the Time field in the
popup calendar. Times entered into this field must be in the
following format: hh:mm:ss a. When timeEntryEnabledFlag
is selected, an OK and Cancel button are added to the popup
calendar, so you can select a date and enter a time before
closing the popup. If the timeEntryEnabledFlag is
deselected, the popup calendar closes as soon as you select
a date.
The Display Viewer Applet
uses JCalendar 1.3.2 which is distributed under Lesser GPL
and can be downloaded from
www.toedter.com/en/jcalendar. The Display Server uses
the
Datejs date library for parsing and formatting dates
and times.
Localization
- The Time field, OK and
Cancel buttons are localized by SL, currently only English
and Japanese are available.
- In the Display Builder,
Display Viewer Application and Display Viewer Applet the
month and day names will use the language settings on the
client system.
- In the Display Server, the
month and day names can be localized by
replacing the date.js file in the Display Servlet
with a localized version.
|
Password Field |
The Password Field control
object works just like
Text Entry Fields
except that instead of displaying entered text, it displays
asterisks (*).
|
|