The position of the text in the field.
Values are Left, Centered, Right.
An alignment setting is not available for the AWT-based AgcTextField. It is a feature provided by the Swing package.
Justification for AgcLabel; Horizontal Alignment, Horizontal Text Position for AgcJLabel
getJustification(), setJustification()
Specifies whether to automatically fill the control with data or wait until the query()
, refreshRows()
, or other methods of AgcData is called.
Applies to AgcChoice, AgcComboBox, AgcList, AgcTreeControl, AgcViewDownloadable, AgcJComboBox, AgcJList.
If a Link Clause that references the parent form is specified, then the Automatic Query property is ignored.
Specifies the control's background color.
Applies to AgcIntegerSpinnerField, AgcLabel, AgcTabControl, AgcTextArea, AgcTextField, AgfForm, AgcJIntegerSpinnerField, AgcJLabel, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
Background Image, Background Image Mode, Dark Shadow Color, Highlight Color, Inactive Tab Color, Shadow Color, Text Color
Component.getBackground()
, Component.setBackground()
Specifies the name and location of an image to display on the form.
For information on URLs and cropping specifications for images, see the Image property.
AgiControl.getBackgroundImage(), AgiControl.setBackgroundImage()
Specifies the way in which the form displays its background image.
The values for the form control include:
AgiControl.getBackgroundImageMode(), AgiControl.setBackgroundImageMode()
Defines the control's border style.
Applies to AgcLabel, AgcRectangle, AgcJLabel.
You can select these border styles in the Property Inspector: None, Outline, Lowered, Raised, Grooved. The default for labels is None and the default for rectangles is Grooved.
AgcRectangle.getBorderStyle(), AgcRectangle.setBorderStyle() , AgcLabel.getBorderStyle(), AgcLabel.setBorderStyle()
The name of a data source triggered business object that supplies a dataset for AgcData.
Using Data Source Objects in the Programmer's Guide
Data source example in Application Techniques
Specifies the button type of an Image Button so that it behaves like a push button, a radio button, or a toggle button.
Types are Push, Toggle, and Radio.
Assigning a type to an Image Button gives the button some of the properties of that type. For example, if Button Type is Radio, you can specify a Radio Button Group for the Image button. Note, however, that even though the button type affects some of the properties of the image button, image buttons are always instances of the AgcButtonImage class.
AgcButtonCheck, AgcButtonRadio, AgcButtonText, AgcButtonRaw, AgcJCheckBox, AgcJRadioButton, AgcJButtonToggle, JButton (in JDK)
Indicates whether the button is the Cancel button for the form.
Applies to AgcButtonImage, AgcButtonText, AgcJButton.
When a button is defined as the cancel button for a form, its actionPerformed event fires when the user presses the ESC key while focus is anywhere on the form.
A button can be both the default button and the cancel button.
Specifies a String expression whose value is displayed as the control's built-in label at runtime.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcLabel, AgcJButton, AgcJCheckBox, AgcJLabel, AgcJRadioButton.
Use the Caption Text property to define a static string. If both a Caption Expression and Caption Text property value are specified, Caption Expression overrides Caption Text.
Use the Text Color, Text Style, and Font properties to customize the appearance of the text.
This expression displays today's date and the company name when the table associated with the form is companies.
today() + " " + companyname
Caption Text, Font Name, Font Size, Font Style, Text Color, Text Style, Tool Tip
Specifies a static text string for the control's built-in label.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcLabel, AgcRectangle, AgcJButton, AgcJCheckBox, AgcJLabel, AgcJRadioButton.
For buttons and labels, you can specify a static text string in the Caption Text property, or an expression that evaluates to the label text at runtime using the Caption Expression property. If you specify both, the text expression is used.
When a Rectangle control surrounds a group of Radio Buttons, use the caption text to identify the purpose of the buttons.
Use the Text Color, Text Style, and Font properties to customize the appearance of the text.
Caption Text, Font Name, Font Size, Font Style, Text Color, Text Style, Tool Tip
Specifies the value that gets written to the database when the Check Box control is checked.
Applies to AgcButtonCheck, AgcJCheckBox.
To bind the Check Box control to a database column, specify a value for the Data Column property. For a bound Check Box control, the Checked Value property is the value written to the database if the check box is checked. When the check box is not checked, the value of the Unchecked Value property is written to the database. If no Checked Value is specified, the value "true" is written to the database when the check box is checked.
AgcButtonRaw.setCheckedValue(), AgcJCheckBox.getCheckedValue(), AgcJCheckBox.setCheckedValue()
Specifies a list of items that is displayed in the control.
Applies to AgcChoice, AgcComboBox, AgcList, AgcTreeControl, AgcJComboBox, AgcJList.
To load the control with data from this list, the Load Choices property must be set to Statically. When Load Choices is set to From Table, SilverStream loads list items from a database table instead.
To enter a list of choices, display the Edit Property dialog box and enter each choice on a separate line.
Specifies the rectangle's fill and border color.
If no color is specified, the rectangle's fill color defaults to gray.
If Transparent is set to true, only the border shows the color and the interior show whatever is behind the rectangle. When Transparent is false, the color fills the rectangle.
Background Color, Dark Shadow Color, Highlight Color, Hover Text Color, Inactive Tab Color, Shadow Color, Text Color, Transparent
AgcRectangle.getColor(), AgcRectangle.setColor()
One or more expressions that associate a property name with a database column or expression. Data is retrieved for each column expression.
Column expressions can combine columns and other data.
At runtime, a column expression is a property of the AgcData control. You can refer to properties by name or index number. You can get and set the values of the properties for the current row.
You can navigate through the retrieved rows using methods of the AgcData's AgiRowCursor interface. You can use methods of AgiBindingMgr to bind columns of AgcData objects to fields on the form.
Name: CName
Expression: companies.companyname
Name: CityState
Expression: companies.city + ", " + companies.stateid + " " + companies.postalcode
AgcData: getProperty(), getPropertyCount(), getPropertyName(), getPropertyIndex(), setProperty()
Data Access Basics in the Programmer's Guide
Specifies the type of control. The value displayed for the Control Type property is similar to the class name of the control without the Agc prefix. Swing-based types begin with "J". Other values are AWT-based types.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcFileAttachment, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
You can convert controls from one type to another by changing their Control Type. Some property values are carried over if they are applicable to the new type.
To change several controls at once, select all the controls and then select a Control Type.
For text fields, you can also specify a data type, which restricts the type of data the user can enter in the field and changes the class of the control.
Specifies the dark shadow color used in the border of the tab control.
Applies to AgcTabControl, AgcJTabbedPane.
Background Color, Highlight Color, Inactive Tab Color, Shadow Color, Text Color
AgcTabControl.setDarkShadowColor(), AgcTabControl.getDarkShadowColor()
Specifies the name of the database column to which the control is bound.
Applies to AgcButtonCheck, AgcButtonRadio, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcIntegerSpinnerField, AgcList, AgcTextArea, AgcTextField, AgcTreeControl, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTextArea, AgcJTextField.
When a control is bound to a database column, the control displays the value in the current row for that column. The user can change the value, which becomes the value updated in the database.
The Data Column property binds a control to a database column, a property of an AgcData control, or another control. Click the ellipses button to display a list of choices. The list includes the main table associated with the form and its columns, related tables and their columns, and any AgcData controls on the form and their named column expressions.
You can associate a table with the form in in the Form Wizard when you create the form, or you can do it later in the Form Designer. To specify a table in the Designer, click the Data icon in the gallery and use the Relational Data Palette to select a table.
AgcData, Accessing Data in the Programmer's Guide
Specifies the type of data to be displayed in the input field.
Applies to AgcTextField, AgcJTextField.
Selecting a field type changes the class instantiated for the control.
AgcPasswordField or AgcJPasswordField The field displays asterisks instead of the characters the user enters. |
Using the Data Type property does some data validation without validation rules or coding the validationTest event. If the user leaves the field and has entered characters that don't match the data type, a validationFailed event is fired.
Control Type, Show Validation Errors, Validation Rules
Specifies the value that is stored in the database when the radio button is the selected button in the button group.
Apples to AgcButtonRadio, AgcJRadioButton.
AgcButtonRaw.setCheckedValue(), AgcJRadioButton.getCheckedValue(), AgcJRadioButton.setCheckedValue()
Specifies the name of the database column which holds the file associated with the AgcFileAttachment control.
To store a non-text file in the database, the data column must be a long varbinary column.
For information on programming for file attachments, see the File attachments section in the Advanced Form Topics chapter of the Programmer's Guide.
Indicates whether the button is the default button for the form.
Applies to AgcButtonImage, AgcButtonText, AgcJButton.
When a button is the default button, its actionPerformed event fires when the user presses Enter while on the form regardless of the control that has focus (unless the control that has focus supports an event for the Enter key, for example Text Area).
A button can be both the default button and the cancel button.
Specifies an image to display when the button is disabled.
For information on URLs and cropping specifications for images, see the Image property.
Normal Image, Pressed Image, Rollover Image
getDisabledIcon(), setDisabledIcon()
Specifies a pattern or style for the contents of the input field (e.g., currency). Formats are listed in the General Reference.
Applies to AgcIntegerSpinnerField, AgcTextField, AgcJIntegerSpinnerField, AgcJTextField. A text field with a non-string data type is subclassed to either AgcValueField or AgcJValueField.
When you choose a data type other than String for a text field, you can specify either a pattern or named display style for the Display Format property.
Data Type, Display Formats in the General Reference
getDisplayPattern(), setDisplayPattern(), getDisplayStyle(), setDisplayStyle()
Specifies the name of the database column whose values are displayed in a list control.
Applies to AgcChoice, AgcComboBox, AgcList, AgcTreeControl, AgcJComboBox, AgcJList.
To load a list from a database table:
The display value can be a single field or an expression combining fields, constants, and functions. For example, the list can display an employee's full name by concatenating the lastname and firstname fields.
The list can also be bound to a database column so that the selected item in the list is the value updated in the database.
You can use Display Value with the Storage Value property, so that the list displays one set of values but sends a different set of values to the database. For example, the list can display product names, but store product IDs.
Load Choices, Storage Value, Table
Specifies whether the retrieved rows represent unique values. Duplicate values are eliminated.
Applies to AgcChoice, AgcComboBox, AgcData, AgcList, AgcTreeControl, AgcViewDownloadable, AgfForm, AgcJComboBox, AgcJList.
When the Distinct property is turned on, the SQL statements generated by the form uses the SQL keyword DISTINCT. This means that each row retrieved is unique.
For example, suppose a table named people contained three fields: First Name, Middle Name, and Last Name. For the SQL statement SELECT DISTINCT * FROM people
, you could get both Bob J. Smith and Bob A. Smith; but if the statement was SELECT DISTINCT firstname, lastname FROM people
, you would get Bob Smith only once since without the middle initial these records appear the same.
For list controls, turning on Distinct means that each display/storage value pair will be unique. If you had a storage column value that was identical in two different rows, but with different display column values, these would be considered distinct, and the user would see several display values associated with the same storage value.
Distinct is most useful when the set of columns being retrieved does not include the primary key (which must be unique across all rows) or when the table does not have a primary key.
Display Value, Limit Rows, Load Choices, Maximum Rows, Storage Value, Table
Specifies an image to display when the button is pressed.
For information on URLs and cropping specifications for images, see the Image property.
AgcButtonRaw.setUpImage(), AgcButtonRaw.getUpImage()
Specifies whether the user can edit the contents of the control.
Applies to AgcComboBox, AgcIntegerSpinnerField, AgcTextArea, AgcTextField, AgcJComboBox, AgcJIntegerSpinnerField, AgcJTextArea, AgcJTextField.
AgcComboBox.getEditable(), AgcIntegerSpinnerField.getEditable(), TextComponent.isEditable(), JComboBox.isEditable(), AgcJIntegerSpinnerField.isEditable(), JTextComponent.isEditable()
Specifies whether the control is enabled when the form is displayed.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
Events that a form produces when it is used as a subform.
You can specify as many events as you need by clicking Add New Event.
The event names should describe the event; you might use names like UPDATE, REFRESH. The names can include letters, numbers, and underscores. In the form code, the identifiers are actually numeric constants. SilverStream converts the name you enter to uppercase, following the Java convention for constants.
To implement programmer-defined events, you do the following:
fireEvent()
with an event identifier as an argument
When you are working on the parent form in the Form Designer, you add the subform to the parent form, which makes the programmer-defined events available in the Programming Editor. The event names use the identifiers you specified in the subform's definition. You write code for the events on the parent form. When you are working on the subform's definition in the Form Designer, you can write code for the subform's standard events, but not the programmer-defined events.
For more information, see the chapter on programming forms in the Programmer's Guide.
Specifies the name of the font used for the text in the control.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
In the Designer, you can choose among these Java fonts: Dialog, SansSerif, Serif, Monospaced, DialogInput. SilverStream also supports these named Java fonts: Helvetica, TimesRoman, Courier, Zapfdingbats. At runtime, Java translates the font name to the appropriate font installed on the system.
getFontIdentifier(), setFontIdentifier()
Specifies the point size of the font used for the text in the control.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
getFontIdentifier(), setFontIdentifier()
Specifies the style of the font used for text in the control. The font styles include: Normal, Bold, Italic, and Bold Italic.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
getFontIdentifier(), setFontIdentifier()
Specifies the control's height in pixels.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcViewDownloadable, AgfForm, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
Note that the control's size (Width and Height) is represented in the database relative to the system's font sizes, ensuring that the control is displayed properly on a system whose default fonts differ from the default fonts on which the control was designed.
Methods of JComponent or Component: getBounds(), getHeight(), getSize(), setBounds(), setSize()
Specifies an HTML file that contains help text associated with the control. The Help Page can either be the name of a page in the application's database, the name of a page in a different database (database:pagename), or a full URL to a help page.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcIntegerSpinnerField, AgcList, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgfForm, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTextArea, AgcJTextField.
When the user presses F1 while the control has focus, SilverStream opens a new browser window and displays this page.
If no Help Page is specified and the user presses the F1 key, then the containing control is searched for a Help Page to display. If the containing control does not have a Help Page, then the next containing control is searched, and so on until either a Help Page is found or the form is reached. This Help Page strategy enables the programmer to determine the level of granularity of the help provided.
A browser is opened only if a Help Page is defined.
AgiControl.setHelpInfo(), AgiControl.getHelpInfo()
Sets the color for the highlight effect on the text of the control.
Applies to AgcLabel, AgcTabControl, AgcJLabel, AgcJTabbedPane.
For labels, the highlight color is only used when the Text Style is Embossed.
Background Color, Dark Shadow Color, Inactive Tab Color, Shadow Color, Text Color
AgcTabControl.setHighlightColor(), AgcTabControl.getHighlightColor(), , AgcJTabControl.setLightHighlightColor(), AgcJTabControl.getLightHighlightColor(), AgcLabel.setTextHighlightColor(), AgcLabel.getTextHighlightColor(), AgcJLabel.setTextHighlightColor(), AgcJLabel.getTextHighlightColor()
The horizontal position of the image and text within the bounds of the label control.
Applies to AgcJLabel, AgcJButton.
The Horizontal Alignment property positions the image and text as a unit. To change the relative positions of the image and text, use the Horizontal Text Position property.
Horizontal Text Position, Vertical Alignment, Vertical Text Position
Specifies whether the control displays a horizontal scrollbar at runtime.
Applies to AgcTextArea, AgcJTextArea.
Specifies the horizontal position of the text in the label control relative to the image.
Applies to AgcJLabel, AgcJButton.
Values are Right of image, Center, Left of image. When both Vertical and Horizontal Text Position are Center, the text displays in front of the image.
Horizontal Alignment, Vertical Alignment, Vertical Text Position
Specifies the image to be displayed when the cursor hovers over the control.
The Hover Image is only displayed when Hover Mode is set to true.
For information on URLs and cropping specifications for images, see the Image property.
AgcButtonRaw.setHoverImage(), AgcButtonRaw.getHoverImage()
Specifies whether the Hover Image or Hover Text Color is displayed.
When the Hover Mode is set to false (the default), the Hover Image and the Hover Text Color are not displayed.
AgcButtonRaw.setHoverMode(), AgcButtonRaw.getHoverMode()
Specifies the color for the control's Caption when the cursor hovers over the control.
When the Hover Mode is set to false (the default), the Hover Text Color is not displayed.
AgcButtonRaw.setHoverTextColor(), AgcButtonRaw.getHoverTextColor()
Specifies the image displayed by the control.
Applies to AgcImage, AgcJLabel.
You can open the Edit Property dialog box to select an image from an attached database or enter the filename yourself. The way you specify the file name depends on where the image is.
The database and file name, separated by a colon; for example, | |
the fully qualified URL; for example, |
For AgcImage, you can use the Image Expression property instead. Use it to specify an expression that evaluates to an image URL at runtime. If you specify values for both Image Expression and Image, Image Expression is used and the value of Image is ignored.
To use part of a larger image, specify the pixel coordinates of the portion of the image you want to use. The full syntax is:
imageurl x y width height
For more information, see the section on cropping a larger image in the Form Designer section of the Tools Guide.
Image Drawing Mode, Image Expression, Pane Images
The name of a form that SilverStream displays when the user clicks the Insert Image toolbar button in the HTML Edit Control.
Applies to AgcHTMLEditControl.
SilverStream displays the form you specify by calling the showFormDialog()
method. When the user closes the form, the form must call the closeDialog()
method. The method's argument is the URL of the image file to be inserted in the HTML Edit Control. The URL can be an absolute URL, or a relative URL referring to an image in the current SilverStream database.
If you don't specify a form in Image Dialog, the HTML Edit Control displays a default dialog for selecting an image.
URLs for images on the SilverStream server
The objects in a SilverStream database are in subdirectories below the SilverStream directory. To refer to an image in the current database, specify:
SilverStream/Objectstore/Images/filename.ext
To refer to an image in another database on the same server, specify the database name, beginning with a slash:
/Otherdatabase/SilverStream/Objectstore/Images/filename.ext
If the image is in the SilverMaster database, you don't need to specify the database name:
/SilverStream/Objectstore/Images/filename.ext
Context base
The default context base for relative URLs is the "current" database, which is the database containing the form that has the HTML Edit Control. For example, suppose that frmMain contains an HTML Edit Control and resides in MyDatabase; a relative URL passed by the closeDialog()
method is relative to http://hostname/MyDatabase/
. An URL that begins with a slash is relative to the server: http://hostname/
.
If your application has its own image store, perhaps provided by a servlet, the Image dialog might return something like MyServlet?ImageID=10023
. This would result in a full URL of http://hostname/MyDatabase/MyServlet?ImageID=10023
.
You can change the base for relative URLs within the HTML Edit Control with the setContextBase()
method. The HTML created in the HTML Edit Control is application data and can be used in other contexts. You might change the context base if the HTML will ultimately be delivered in some other environment, such as from a servlet in some other location.
Suppose that the form frmMain includes an HTML Edit Control. For the control's Image Dialog property, you specify frmImagePicker
, which is in the same database as frmMain. The field fldImageName
on frmImagePicker holds the image file name the user selected. In the
actionPerformed event for the OK button of frmImagePicker, this code calls closeDialog()
with the image file name as its argument.
closeDialog( fldImageName.getText() );
Link Dialog, Raw HTML Dialog, Toolbar
AgcHTMLEditControl.setContextBase()
Specifies how the control displays the image.
Image, Image Expression, Background Image Mode (for a form's background image)
Specifies a String expression whose value is the image name. The expression is evaluated at runtime and the control displays the image.
To specify a static image file name, use the Image property.
Image Expression could specify the image in many ways: for example, the name of the image might be stored in a database column, or the image file could be stored as a file attachment. For information on URLs and cropping specifications for images, see the Image property.
If you specify values for both Image Expression and Image, Image Expression is used and the value of Image is ignored.
This expression displays a different image depending on the hour of the day:
if (hour(now()) >= 13) then "silvermaster35:ab2a.gif" else "silvermaster35:ab2b.gif" endif
This example displays a different image depending on the value in an integer input field:
if ( fldTree >= 5) then "silvermaster35:ab2a.gif" else "silvermaster35:ab2b.gif" endif
Specifies the color of the tabs that are not selected.
Applies to AgcTabControl, AgcJTabbedPane.
Background Color, Dark Shadow Color, Highlight Color, Shadow Color, Text Color
AgcTabControl.getInactiveTabColor(), AgcTabControl.setInactiveTabColor()
Specifies an integer amount used to increment or decrement the Integer Spinner's value when the user clicks an arrow.
Applies to AgcIntegerSpinnerField, AgcJIntegerSpinnerField.
AgcIntegerSpinnerField.setIncrement(), AgcIntegerSpinnerField.getIncrement()
Specifies how the form loads data when the form is instantiated.
When you create a new form using the Form Wizard, you are prompted to choose an initial data mode. You can change the value of Initial Mode under the Data heading in the Property Inspector.
The form loads all the data from the server and the form's controls display the first database record. If the form's dataset is large, there can be a long delay before the form is displayed. To reduce the size of the dataset, specify a Where clause in the Property Inspector or in the query() method at runtime (same as calling the agData.first() method in the formLoaded event). | |
The form does not load any data from the server.The form's controls do not display data. The form is initially in find mode. (same as calling the beginFind() method.) | |
The form does not load any data from the server. The form's controls do not display data. Users can add database records. | |
No data is loaded to the form. To retrieve data, call the query() method with an optional Where clause. |
Specifies the slider's initial runtime value.
In the Property Inspector, the initial value you specify must be between or equal to the minimum and maximum values.
Specifies an amount of time, in seconds, between timeIntervalExpired events.
When the interval has elapsed, the
timeIntervalExpired event is fired and the timer restarts. To stop the timer, call the stopTimer()
method.
Reverses the scale on the slider.
When the slider is not inverted, the minimum value is on the left when the orientation is horizontal, or at the bottom when the orientation is vertical.
When Inverted is selected, the minimum value is on the right instead of the left when the orientation is horizontal, or the top instead of the bottom when the orientation is vertical.
The horizontal position of the label text.
Values are Left, Centered, Right.
Alignment for AgcJTextField; Horizontal Alignment, Horizontal Text Position for AgcJLabel
getJustification(), setJustification()
Specifies the location of the upper left corner of the control in pixels, relative to the control's container (e.g., a form control).
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcViewDownloadable, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
Component.getLocation(), Component.setLocation()
Specifies whether an upper limit is in effect for the number of rows retrieved.
Applies to AgcChoice, AgcComboBox, AgcData, AgcList, AgcTreeControl, AgcViewDownloadable, AgfForm, AgcJComboBox, AgcJList.
Limit Rows takes effect when Maximum Rows is set to a value other than 0.
For AgfForm, the limit applies to the number of rows retrieved by the AgData control. For the various list and tree controls, the limit applies when Load Choices is From Table and affects the number of items retrieved for the list.
For AgcViewDownloadable, the limit applies to the rows displayed. The user can scroll to additional groups of rows. The full result set is always retrieved.
Distinct, Load Choices, Maximum Rows
Specifies whether text wraps to the next line when the text reaches the right edge of the text area control.
Applies to AgcTextArea, AgcJTextArea.
If Line Wrap is off and text extends beyond the edge of the control, a horizontal scrollbar automatically appears. The user can put text on the next line by pressing Enter.
JTextArea.getLineWrap(), JTextArea.setLineWrap()
Specifies whether a line break occurs only between words or between individual characters.
Applies to AgcTextArea, AgcJTextArea.
Values are Wrap Words and Wrap Characters. The wrap style takes effect when Line Wrap is true.
When set to Wrap Characters, each line in the text area is completely filled to the right margin before text wraps to the next line. A break can occur in the middle of a word and a subsequent line can begin with a space.
When set to Wrap Words, breaks occur only when a space or punctuation occurs in the text.
Specifies a link between the data of the form and a child of the form.
Applies to AgcViewDownloadable, subforms.
The Link clause identifies the relationship between data on the main form and a child form. Using a Link clause, a child form can display a set of records from another table related to a master record displayed on the main form.
The Link clause describes a join operation between the datasets of the form and a child form. It becomes part of the Where clause used in the database query for the child form. If the child form already has a Where clause, the Link clause is ANDed with it. At runtime, when the state of the parent form changes, the server is re-queried to determine the appropriate data to display in the linked controls.
In the Designer, a Link clause is generated automatically when the child control is added to the form. You can build your own link clause by selecting columns in the Expression Builder.
orders.orderid = orderdetails.orderid
Using child forms in the chapter on programming forms in the Programmer's Guide
The name of a form that SilverStream displays when the user clicks the Insert Link toolbar button in the HTML Edit Control.
Applies to AgcHTMLEditControl.
SilverStream displays the form you specify by calling the showFormDialog()
method. When the user closes the form, the form must call the closeDialog()
method. The argument for closeDialog()
specifies the URL to be used in the A tag in the HTML Edit Control. The URL can be absolute, or it can be a relative URL for a page in the current SilverStream database.
If you don't specify a form in Link Dialog, the HTML Edit Control displays a default dialog for selecting a link target.
URLs for pages on the SilverStream server
The objects in a SilverStream database are in subdirectories below the SilverStream directory. To link to a page in the current database, you don't need to specify the subdirectories; specify only the file name:
filename.ext
To link to a page in the SilverMaster database or another database on the same server, specify an absolute URL; include the path to the Pages directory:
http://hostname/Otherdatabase/SilverStream/Pages/filename.ext
Context base
The default context base for relative URLs is the "current" database, which is the database containing the form that has the HTML Edit Control. For example, suppose that frmMain contains an HTML Edit Control and resides in MyDatabase; a relative URL passed by the closeDialog()
method is relative to http://hostname/MyDatabase/
.
You can change the base for relative URLs within the HTML Edit Control with the setContextBase()
method. The HTML created in the HTML Edit Control is application data and can be used in other contexts. You might change context base if the HTML will ultimately be delivered in some other environment, such as from a servlet in some other location.
Suppose that the form frmMain includes an HTML Edit Control. For the control's Link Dialog property, you specify frmLinkPicker
, which is in the same database as frmMain. The field fldLinkTarget
on frmLinkPicker holds the URL the user selected. In the
actionPerformed event for the OK button, this code calls closeDialog()
with the URL.
closeDialog( fldLinkTarget.getText() );
Image Dialog, Raw HTML Dialog, Toolbar
AgcHTMLEditControl.setContextBase()
Specifies how to load list items for the control.
Applies to AgcChoice, AgcComboBox, AgcList, AgcTreeControl, AgcJComboBox, AgcJList.
When data is loaded Statically, the contents of the list are determined at design time. You might choose to load the data statically when the list is small and its contents are known at design time. You can also map the displayed choices to internal values, such as IDs or numbers.
For example, the data might be limited to New Customer, Current Customer, Former Customer, or Prospect.
If data is loaded Statically, the control supports a Choices property and a Values property.
When data is loaded dynamically, the list choices are populated from a database table. You would load the data dynamically when the contents of the list are unknown, the list changes frequently, or the contents of the list reside in a dataset.
To load the data dynamically, specify values for the Table and Display Value properties. You can also specify a value for Storage Value if you want the list to display one value but store another in the database when an item is selected.
For AgcTreeControl, you can only specify one level of data in the Property Inspector. To specify a multilevel hierarchy, write code in the formLoaded event.
Choices, Display Value, Distinct, Load Choices, Limit Rows, Maximum Rows, Storage Value, Values
Specifies whether the AgcData control loads data from a database table or from specifications in a data source business object.
Values are From Table and From Business Object.
From Table loads data directly from the database. When you select this option, you can then specify the table and expressions for the column data to be retrieved in the Table and Column Expressions properties. You can further qualify the data that is retrieved with the Where Clause and Order By properties.
When you select From Business Object, you can specify a data source triggered business object that you have defined.
Business Object Name, Column Expressions, Order By, Table, Where Clause
Chapter on data source business objects in the Programmer's Guide; AgiDataSource DSO example in Application Techniques
Specifies the numeric interval between major tick marks on the slider control.
Tick marks on the slider give the user feedback for the current value of the slider's pointer. The slider can display major tick marks (longer lines) and minor tick marks (shorter lines). When labels are turned on, they label the major tick marks. If you display labels, make sure the Major Tick Spacing interval is big enough so the labels don't overlap.
When Snap to Ticks is turned on, the slider's pointer jumps to the closest major or minor tick mark, whether or not tick marks are displayed.
To see tick marks, turn on Show Ticks.
Minor Tick Spacing, Show Labels, Show Ticks, Snap To Ticks
JSlider.getMajorTickSpacing(), JSlider.setMajorTickSpacing()
Specifies the maximum number of characters allowed in a text input field.
Applies to AgcTextField, AgcJTextField.
If the user enters too many characters and tries to leave the field, SilverStream displays a message telling the user the limit and returns focus to the field. The user cannot leave the field until the input is within the length limits.
If you don't want SilverStream to display an error message, disable validation error messages by clearing the Show Validation Errors check box (under the Data heading on the Form page in the Property Inspector). This suppresses error messages for all controls on the form.
If you disable messages, you can write code for the control's validationFailed event to display your own message. This example adds additional text to the message SilverStream would have displayed.
agDialog.showMessage("Bad input! " + evt.getMessage());
Min Length, Show Validation Errors
getMaxLength(), setMaxLength()
Forms and data validation in the Form Basics chapter of the Programmer's Guide
Specifies the upper limit for the number of rows retrieved when Limit Rows is true.
Applies to AgcChoice, AgcComboBox, AgcData, AgcList, AgcTreeControl, AgcViewDownloadable, AgfForm, AgcJComboBox, AgcJList.
Maximum Rows takes effect when Limit Rows is true.
If Maximum Rows is 0, all rows are retrieved. Specifying 0 is the same as leaving Limit Rows unchecked.
For AgfForm, the limit applies to the number of rows retrieved by the AgData control. For the various list and tree controls, the limit applies when Load Choices is From Table. It affects the number of items retrieved for the list.
Distinct, Load Choices, Limit Rows
Specifies the maximum value for the up arrow in a spinner control.
Applies to AgcIntegerSpinnerField, AgcJIntegerSpinnerField.
The user can also type a value in the spinner's input field. This value is not limited by Max Value. To limit the value that the user can type in spinner controls and numeric input fields, specify validation rules for the control.
AgcIntegerSpinnerField.getMaxValue(), AgcIntegerSpinnerField.setMaxValue()
Specifies the high value for the slider's range.
The position of the high value on the slider depends on the Inverted and Orientation properties.
Minimum Value, Initial Value, Inverted, Orientation
Specifies the minimum number of characters allowed in a text input field.
Applies to AgcTextField, AgcJTextField.
If the user enters too few characters, SilverStream displays a message telling the user the limit and returns focus to the field. The user cannot leave the field until the input is within the length limits.
If you don't want SilverStream to display an error message, disable validation error messages by clearing the Show Validation Errors check box (under the Data heading on the Form page in the Property Inspector). This suppresses error messages for all controls. To display your own message, write code for the validationFailed event.
Max Length (validationFailed event example), Show Validation Errors
getMinLength(), setMinLength()
Forms and data validation in the Form Basics chapter of the Programmer's Guide
Specifies the minimum value for the down arrow in a spinner control.
Applies to AgcIntegerSpinnerField, AgcJIntegerSpinnerField.
The user can also type a value in the spinner's input field. This value is not limited by Min Value. To limit the value that the user can type in spinner controls and numeric input fields, specify validation rules for the control.
AgcIntegerSpinnerField.getMinValue(), AgcIntegerSpinnerField.setMinValue()
Specifies the low value for the slider's range.
The position of the low value on the slider depends on the Inverted and Orientation properties.
Maximum Value, Initial Value, Inverted, Orientation
Specifies the numeric interval between minor tick marks on the slider control.
Where a minor and major tick mark coincide, a major tick mark is displayed.
Tick marks on the slider give the user feedback for the current value of the slider's pointer. For more information, see Major Tick Spacing.
Major Tick Spacing, Show Labels, Show Ticks, Snap To Ticks
JSlider.getMinorTickSpacing(), JSlider.setMinorTickSpacing()
Specifies the name for the control when programming.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcData, AgcFileAttachment, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTimer, AgcTreeControl, AgcView, AgcViewDownloadable, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
The name you specify is used for the variable that holds a reference to the control. When you change the name of a control and compile the form, the name is changed throughout your code and generated code.
When a control is created in a Designer, it is assigned a default name corresponding to that control type. For example, all Label controls (AgcLabel) are named Labeln by default, where n is an integer that begins at 1 and is incremented by one for each instance of the control created. If three instances of a Label control are placed on a form, the controls are created with the default names Label1, Label2, and Label3.
When you change the name to a meaningful identifier for your application, it must follow these Java rules:
As part of your application development guidelines, you might want to adopt standard prefixes that identify the type of each control. See the General Reference for suggested guidelines.
Specifies an image to display when the button is in its normal state.
The normal state means the button is not pressed or disabled and the mouse is not over the button. This image is also used as the pressed and disabled image if the other image properties have no value.
For information on URLs and cropping specifications for images, see the Image property.
Disabled Image, Pressed Image, Rollover Image
A String value that represents a SQL Order By clause. The SQL Order By clause specifies the order in which the selected records are returned from the database.
Applies to AgcChoice, AgcComboBox, AgcData, AgcList, AgcTreeControl, AgfForm, AgcJComboBox, AgcJList.
To specify an Order By clause, open the Expression Builder, select a column or specify an expression that uses one or more columns, and choose the Ascending or Descending button.
Specifies whether the slider track is horizontal or vertical.
When you change the orientation, you will probably need to change the slider's size and position.
To reverse the location of the high and low values, use the Inverted property.
Specifies text to display on the tab of a pane.
Applies to AgcTabControl, AgcJTabbedPane.
The number of captions you can specify correspond to the number of panes specified in the Panes property. For each pane, you can specify a text caption, an image, or both.
Inactive Tab Color, Pane Images, Panes
AgcTabControl.getPaneName(), AgcTabControl.setPaneName(), JTabbedPane.getTitleAt(), JTabbedPane.setTitleAt()
Specifies an image to display on the tab of a pane.
Applies to AgcTabControl, AgcJTabbedPane.
The number of captions and images you can specify correspond to the number of panes specified in the Panes property. For each pane, you can specify a text caption, an image, or both.
The size of the pane's tab will be adjusted to fit the image you specify, so the image shouldn't be very large. To use part of a larger image, specify the pixel coordinates of the portion of the image you want to use. The syntax is:
imageurl x y width height
For more information, see the section on cropping a larger image in the Form Designer section of the Tools Guide.
For information on ways to specify image files, see the Image property.
Background Color, Image, Inactive Tab Color, Pane Captions, Panes
AgcTabControl.getPaneImage(), AgcTabControl.setPaneImage(), JTabbedPane.getIconAt(), JTabbedPane.setIconAt()
Specifies the number of panes for the control.
Applies to AgcTabControl, AgcJTabbedPane.
For tab controls, the default is three.
AgcTabControl.getPaneCount(), AgcTabControl.setPaneCount(), JTabbedPane.getTabCount(), JTabbedPane.addTab(), JTabbedPane.insertTab()
A named parameter associated with a subform. Using parameters is a technique for passing information between a parent form and a child form when the child form is displayed with the showPage()
method.
Parameters can no longer be added in the Designer. For information on using parameters as well as other techniques for communicating between parent and child forms, read about using child forms in the Programming Forms chapter of the Programmer's Guide.
showPage() in the PVHelperBrowser class
Specifies an image to display when the button is pressed.
If you don't specify a pressed image, the button displays the normal image when it is pressed.
For information on URLs and cropping specifications for images, see the Image property.
Disabled Image, Normal Image, Rollover Image
getPressedIcon(), setPressedIcon()
Specifies the name of the Radio Button's button group.
Applies to AgcButtonImage, AgcButtonRadio, AgcJRadioButton.
Radio Button controls are used to allow a user to select a single choice from multiple values. When the user selects one button in the group, a previously selected button is deselected. The button group determines the set of controls that work together as a selection unit.
The group name is an arbitrary string. You must assign the same string to all the buttons that should work together as a group. The default name for AgcButtonImage and AgcButtonRadio controls is DefaultButtonGroup. The default name for AgcJRadioButton is DefaultJButtonGroup.
The name of a form that SilverStream displays when the user clicks the Raw HTML toolbar button (the button that shows a pair of angle brackets) in the HTML Edit Control.
Applies to AgcHTMLEditControl.
SilverStream displays the form you specify by calling the showFormDialog()
method. When the user closes the form, the form must call the closeDialog()
method. The argument for closeDialog()
specifies the HTML to be inserted in the HTML Edit Control.
If you don't specify a form in Raw HTML Dialog, the HTML Edit Control displays a default dialog for entering a line of HTML.
Suppose that the form frmMain includes an HTML Edit Control. For the control's Raw HTML Dialog property, you specify frmEnterRawHTML
, which is in the same database as frmMain. The field fldRawHTML
on frmEnterRawHTML
holds the data the user entered. In the
actionPerformed event for the OK button, this code calls closeDialog()
with the raw HTML as an argument.
closeDialog(fldRawHTML
.getText() );
Image Dialog, Link Dialog, Toolbar
Specifies an image to display when mouse is over the button.
If you don't specify a rollover image, the button displays the normal image when the mouse if over the button.
For information on URLs and cropping specifications for images, see the Image property.
Disabled Image, Normal Image, Pressed Image
getRolloverIcon(), setRolloverIcon()
Sets the color for the shadow effect on the control.
Applies to AgcLabel, AgcTabControl, AgcJLabel, AgcJTabbedPane.
For the Label control, the Shadow Color is only used when the Text Style is Embossed or Drop Shadow.
Background Color, Dark Shadow Color, Highlight Color, Inactive Tab Color, Text Color
AgcTabControl.getShadowColor(), AgcTabControl.setShadowColor()
Specifies whether labels mark the intervals on the slider.
The labels are the numeric values of the major tick marks. You can display labels, tick marks, or both.
Major Tick Spacing, Minor Tick Spacing, Show Ticks, Snap To Ticks
JSlider.createStandardLabels(), JSlider.getLabelTable(), JSlider.setLabelTable()
Specifies whether lines mark the intervals on the slider.
Show Ticks controls the display of both major and minor tick marks. If the Tick Spacing value for either is 0, those tick marks aren't displayed.
Major Tick Spacing, Minor Tick Spacing, Show Ticks, Snap To Ticks
JSlider.getPaintTicks(), JSlider.setPaintTicks()
Specifies whether the form displays a validation failure message in a dialog box when a control fails validation.
By default, the Show Validation Errors property is set to true. The form can be prevented from displaying any validation failure messages by unchecking the Show Validation Errors check box on the form property sheet. When the Show Validation Errors property is checked, then validation failure messages are displayed in a message box. To handle validation failures some other way (for example, in the form validationFailed event) uncheck this box to prevent the dialog from showing.
A control can fail validation because user input didn't meet the criteria of a validation rule, it violated limits set by some properties, or code in the validationTest event failed the data by throwing an exception.
Specifies whether the slider's pointer snaps to a tick mark when the user moves it.
Major Tick Spacing, Minor Tick Spacing, Show Ticks
JSlider.getSnapToTicks(), JSlider.setSnapToTicks()
Specifies whether the timer control starts automatically when the application starts.
If Start Automatically is set to false, call the startTimer()
method to start the Timer.
AgcTimer.startTimer(), AgcTimer.stopTimer()
Specifies the name of the database column which contains the internal values of the list items.
Applies to AgcChoice, AgcComboBox, AgcList, AgcTreeControl, AgcJComboBox, AgcJList.
To load a list with data from a database table, set the Load Choices property to From Table. Then specify a value for the Table property and Display Value properties. You can also specify the Storage Value property if you want a bound control to store a value in the database that is different from the displayed value.
The Display value specifies the text that is shown to the user in the list. The Storage value is used internally to determine which list value becomes selected, and also what value to store in the database when the user chooses from the list. It is not normally shown to the user.
For example, a database may store region data by number, and the region list is stored in a table containing a region number column (e.g. 1, 2, etc) and a description column (e.g. Northeast, Midwest, etc). The Display value property could be set to the description column, and the Storage value property to the number column. If a record were then displayed in a form, and the record's region column contained the number 2, the control would look for this region number from its list of internal storage values to determine which list choice to display. Since the storage value 2 corresponds to the display value Midwest, then Midwest will be displayed in the control. Then, if the user were to select the Northeast item from the list, the control would determine that the display value Northeast corresponds to the storage value 1, and so it would set the record's region value to 1.
Load Choices, Table, Display Value
Specifies the name of the database table from which the control loads its list data.
Applies to AgcChoice, AgcComboBox, AtcData, AgcList, AgcTreeControl, AgcJComboBox, AgcJList.
For a form, you can specify or change the table associated with the form using the Relational Data Palette, rather than the Property Inspector.
Load Choices, Display Value, Order By, Storage Value, Where Clause
Sets the color for the control's text.
Applies to AgcIntegerSpinnerField, AgcLabel, AgcRectangle, AgcTextArea, AgcTextField, AgcJIntegerSpinnerField, AgcJLabel, AgcJTextArea, AgcJTextField.
Font Name, Font Size, Font Style, Highlight Color, Shadow Color, Text Style
Specifies the style for the Label's text.
Applies to AgcLabel, AgcJLabel.
The Text Style supports these text styles: Normal, Drop Shadow, and Embossed. When the style is Embossed, the control uses a Highlight Color and a Shadow Color. When the style is Drop Shadow, the control uses a Shadow Color.
Caption Expression, Caption Text, Highlight Color, Shadow Color, Text Color
AgcLabel.setTextStyle(), AgcLabel.getTextStyle()
Specifies a single line of text that is displayed when the user moves the mouse over the control.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
AgiControl.setToolTipText(), AgiControl.getToolTipText()
Specifies whether the HTML Edit Control displays the toolbar at runtime.
Applies to AgcHTMLEditControl.
Image Dialog, Link Dialog, Raw HTML Dialog
Specifies the location of the top of the control in pixels, relative to the control's container (e.g., the form control.)
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcViewDownloadable, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
Component.getLocation(), Component.setLocation()
Specifies whether the control is transparent.
Applies to AgcButtonImage, AgcImage, AgcLabel, AgcRectangle, AgfForm, AgcJButton, AgcJLabel.
When Transparent is true, then the control is transparent and objects behind the control show through. The background color does not fill the control.
JComponent.isOpaque(), JComponent.setOpaque()
Specifies the value that gets written to the database when the user unchecks the Check Box.
Applies to AgcButtonCheck, AgcJCheckBox.
When the Check Box control is bound to a database column (specified by the Database Column property), the Unchecked Value property specifies the value written to the bound database column when the Check Box is not checked. If an Unchecked Value is not specified, then the value "false" is written to the database when the Check Box isn't checked.
Checked Value, Database Column
Specifies an image to display when the button's pressed state is false, that is, the button is not pressed.
For information on URLs and cropping specifications for images, see the Image property.
AgcButtonRaw.setUpImage(), AgcButtonRaw.getUpImage()
One or more expressions that result in a true or false value, used to ensure that the user enters valid data.
Applies to AgcIntegerSpinnerField, AgcTextField, AgcTextArea, AgcJIntegerSpinnerField, AgcJTextField, AgcJTextArea, AgcJEditorPane.
When data fails a validation rule, SilverStream displays a message and fires the validationFailed event.
The rules you specify are listed in on the property sheet, each in an input field. Click Add new rule to get a new input field for another rule. Beside each rule, click the ellipses button to display the Expression Builder for that rule.
The Expression Builder provides tools for specifying validation rules. In the left pane, you see:
At the bottom of the Validation Rules Expression Builder, you can specify a message to display when the user's data fails the Validation Rule (that is, the expression results in false).
To respond to the error with more than SilverStream's message box, write code for the validationFailed event. You can correct the value or force focus back to the control.
In addition to validation rules, you can validate data with code in the validationTest event. You can also set properties that check the length and value in an input field.
This rule specifies that the user's value must be the same as the value in the fldStateID input field.
_newValue = fldStateID
This rule specifies that the new value must be greater than the last value entered in the field.
_newValue > _lastValue
This rule specifies that the value in the date field must be greater than today's date.
_newValue > today()
This rule specifies that the input must begin with "http:" or "HTTP:".
lower(_newValue) startsWith "http:"
Max Length, Max Value, Min Length, Min Value
Specifies a list of values that map to the static choices displayed to the user.
Applies to AgcChoice, AgcComboBox, AgcList, AgcTreeControl, AgcJComboBox, AgcJList.
To specify a list for the Values property, set the Load Choices property to Statically.
To enter a list of values, display the Edit Property dialog box and enter each value on a separate line. The number of lines should be the same as the number of items in the list for the Choices property.
The Values property provides a convenient way to work with the data when you want to show the user a "readable" value, but internally you want to work with IDs or numbers for those values. For example, to allow the user to choose from a number of different products, you could specify product names in the Choices property and product IDs in the Values property.
The Values property serves the same purpose as the Storage Values property when the list is loaded from a database table.
Choices, Load Choices, Storage Value
e.g., AgcJList.getItemAt(), AgcJList.getItemValue(), AgcJList.insertItemAt()
The vertical position of the image and text within the bounds of the label control.
Applies to AgcJButton, AgcJLabel.
The Horizontal Alignment property positions the image and text as a unit. To change the relative positions of the image and text, use the Horizontal Text Position property.
Horizontal Text Position, Vertical Alignment, Vertical Text Position
Specifies whether the control displays a vertical scrollbar at runtime.
Applies to AgcTextArea, AgcJTextArea.
Specifies the vertical position of the text in the label control relative to the image.
Applies to AgcJButton, AgcJLabel.
Values are Above image, Center, Below image. When both Vertical and Horizontal Text Position are Center, the text displays in front of the image.
Horizontal Alignment, Horizontal Text Position, Vertical Alignment
Specifies whether this control is initially visible on the form at runtime.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcViewDownloadable, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
Component.isVisible(), Component.setVisible()
A String expression that represents a SQL Where Clause. It can be set through the Property Inspector. A Where clause can also be specified using the query()
method. If a Where Clause property is specified in the Property Inspector and then the query()
method is also called, the Where clause for query()
is ANDed to the Where Clause property to create a single SQL Where clause.
A SQL Where Clause specifies criteria or conditions that must be met in order for a record to be included in a dataset. (SilverStream appends the Where keyword to the SQL String so it is not necessary to enter it in the Property Inspector.)
Applies to AgcChoice, AgcComboBox, AgcData, AgcList, AgcTreeControl, AgfForm, AgcJComboBox, AgcJList.
For the Where Clause property, specify columns using tablename.columnname
syntax. Do not specify the keyword Where; SilverStream adds it automatically.
Specifying a Where clause with the AgfForm class can sometimes improve performance. For example, if a Where clause is specified that only references fields in the dataset from which the choices are being loaded, then the restriction of choices is fixed. This allows the SilverStream server to compute the list before it downloads the page that contains the control, thus speeding up the display of data.
If the Where clause references fields in the containing form's dataset or values of other controls on the form, then the set of choices is not fixed; it can change based on user actions. For example, the form might contain a check box specifying whether the user wants to choose from Active or Inactive customers. In this case, the Where clause is called a "Link Clause" because it allows a link between the state of the form and the set of choices in the list control. Whenever the state of the form changes, the control automatically re-queries the server to determine the appropriate set of choices to display.
Note that SilverStream does not perform any SQL syntax checking. If the SQL is not syntactically correct, a runtime error is generated. Since some database management systems are case-sensitive, the table and field references should exactly match the names used in the database.
With the List, Tree, Choice, or ComboBox controls, the Load Choices property must be set to From Table to load data from a dataset.
employees.empid > 0
employees.deptid=200
Link Clause, Load Choices, Load Data, Order By
Specifies the control's width in pixels.
Applies to AgcButtonCheck, AgcButtonImage, AgcButtonRadio, AgcButtonText, AgcChoice, AgcComboBox, AgcHTMLEditControl, AgcImage, AgcIntegerSpinnerField, AgcLabel, AgcList, AgcRectangle, AgcTabControl, AgcTextArea, AgcTextField, AgcTreeControl, AgcView, AgcViewDownloadable, AgfForm, AgcJButton, AgcJCheckBox, AgcJComboBox, AgcJIntegerSpinnerField, AgcJLabel, AgcJList, AgcJRadioButton, AgcJSlider, AgcJTabbedPane, AgcJTextArea, AgcJTextField.
Note that the control's size (Width and Height) is represented in the database relative to the system's font sizes, ensuring that the control is displayed properly on a system whose default fonts differ from the default fonts on which the control was designed.
Methods of JComponent or Component: getBounds(), getHeight(), getSize(), setBounds(), setSize()
Specifies whether to display the label text on multiple lines if the control is too narrow to display the text on a single line.
Applies to AgcLabel, AgcJLabel.
When Word Wrap is true and when the text is too long for the control, the text displays on multiple lines. If Word Wrap is false, the text is truncated. If the height of the control is too small for the number of lines, the characters are clipped.