When you create a block, you create an XML file using regular HTML tags and formatting in addition to specific TeamConnect tags and attributes that display custom fields, wizard parameters, and their labels on the page. You may also use style sheets, if necessary.
You can edit an XML file for a block manually, using every available TeamConnect block tag. For blocks that are to become part of object views, you can also use the Screen Designer, which has a drag-and-drop GUI that lets you build blocks quickly. The set of block tags available to the Screen Designer is just a subset of all the available block tags in TeamConnect.
See the Screen Designer Help for information on creating custom blocks using the Screen Designer tool.
Note: As a time-saving feature you can start a block's XML file using the Screen Designer, then later edit that file manually to add extra block tags.
At runtime, a block that was created using Screen Designer may display an error message if all of the following are true:
•The block is part of a custom object definition.
•The category chosen for the block is a custom category.
•The record currently being displayed has not had that custom category assigned to it.
To guard against this possibility, you can do the following:
•Finish laying out the block using Screen Designer.
•Manually edit the resulting XML file, adding a tc:section tag that encapsulates the block and specifies the custom category used by the block.
Note: After this manual edit, the XML file cannot be reopened in Screen Designer, since Screen Designer is unable to parse the tc:section tag.
The table below explains Page Elements, and their properties, in more detail. Where the documentation refers to "expression", the syntax used is Java Expression Language (JEXL) unless otherwise stated.
Page Elements
Element |
Property |
Notes |
Field Column Layout |
|
See the detailed explanation of a layout in step 4. |
If Statement |
|
(tc:if) Conditions the display of any elements inside the if by evaluating an expression. |
test |
The expression to be evaluated. |
|
|
negate |
If YES, the expression must evaluate false for the contents inside the if to be displayed. If NO, the expression must evaluate true for the contents inside the if to be displayed. If this property is omitted, it is assumed to be NO. |
If-Else Statement |
|
When dragged to the layout, produces two If elements, the second of which uses property negate=YES. The same value of property test should then be entered in each of the two If elements. |
Java Class |
|
(tc:useClass) |
|
id |
Must be unique within the block. Can be referenced by CSS or Javascript |
|
name |
Required. The name of the Java class. The class file must be located in the same folder that contains the block XML file. |
Message |
|
(tc:message) Places text output on the page outside the boundaries of a Field Column layout. Unlike the similar out element, a message element is localized. |
key |
The full i18n key of the message text to be displayed. For information about i18n keys, see Creating Custom Messages. |
|
Message Parameter |
|
This element can only be dragged into an existing Message element. Some Message elements accept substitution parameters at runtime. For each such parameter in a Message, you need a Message Parameter element. |
|
value |
Text or expression to be placed in the body of the Message element. |
Out |
|
(tc:out) Places text output on the page outside the boundaries of a Field Column layout. Unlike the similar Message element, an Out element cannot be localized. |
value |
Text or expression to be rendered in the block. |