Show/Hide Toolbars

Custom block files use several TeamConnect tags that allow you to display and organize custom fields and parameters within a block.

TeamConnect Block Tags

Tag

Description

tc:include

Displays a custom block in a custom block.

tc:label

Displays custom field labels in a block.

tc:field

Displays custom fields in a block.

tc:blockTemplate

Displays the title of a block.

tc:wizardParameter

Displays wizard parameter fields in a block created for wizards.

tc:wizardParameterLabel

Displays wizard parameter labels in a block created for wizards.

tc:message

Displays localized messages in a custom block.

tc:messageParam

Displays message parameter values.

For additional block tags that are related to reports, see in Using Tags to Embed Reports in Blocks.

In cases where this topic refers to an "expression" inside a tag, Java Expression Language (JEXL) is the syntax.

Caution: Do not type field labels or other field information directly in your block files. The formatting specified in the system settings and user preferences do not applied to them. You also have to manually update the labels in all files if the labels change.

tc:include

This tag displays a custom block within a custom block.

The <tc:include> tag:

Must always be in lowercase.

Must use the following attribute:

oThe block attribute that references the block file in the current object definition.

Uses the following syntax:

<tc:include block="BlockName" />

oBlockName—The file name of the block you want to include. If the BlockName attribute does not have a file extension, TeamConnect looks for BlockName.xml, and then for BlockName.scr.xml.

For example, the following code would include and render a block with file name SampleFile.xml or SampleFile.scr.xml:

<tc:include name="SampleFile" />

tc:label

This tag displays the label of a custom field. You may use it in blocks created for object views and wizards. Insert tc:label before the tc:field tag to identify the field on the page. For certain field types, such as check-boxes, the label typically displays after the field.

The <tc:label> tag:

Must always be in lowercase.

Must use two attributes:

oThe select attribute that references the field name of the appropriate custom field.

oThe category attribute that references the tree position of the field's category.

Uses the following syntax:

<tc:label name="FieldName" category="FullTreePosition" />

oFieldName—The name (not label) of the field you want to include.

oFullTreePosition—The full tree position of the category for the field.

For example, the following code displays the label "Incident Date & Time" of the custom field with the name "LossDate," created for the root category of the Claim object definition with the unique code CLAM:

<tc:label name="LossDate" category="CLAM" />

For attributes that you can use with field labels, see Label Tags.

tc:field

This tag displays the field, either blank or with its default value. You may use it in blocks created for object views and wizards.

The <tc:field> tag:

Must always be in lowercase.

Must use two attributes:

oThe name attribute that references the field name of the appropriate custom field

oThe category attribute that references the tree position of the field's category.

Uses the following syntax for system fields:

<tc:field name="applicationEntity.FieldName" appropriate attributes/>

Uses the following syntax for custom fields:

<tc:field name="applicationEntity.FieldName" category="FullTreePosition" appropriate attributes/>

oFieldName—The name (not label) of the field you want to include.

oFullTreePosition—The full tree position of the category for the field.

oappropriate attributes—The appropriate formatting attributes, if necessary.

For example, the following code displays two date fields, ClaimMade and LossDate, both created for the root category of the Claim object definition with the unique code CLAM. The LossDate field, however, appears with a time field next to it because of the showTime formatting attribute.

<tc:field name="ClaimMade" category="CLAM" />

<tc:field name="LossDate" category="CLAM" showTime="true"/>

For attributes that you can use with tc:field, see Using Tag Attributes.

tc:wizardParameter

This tag displays the parameter field, either blank or with the default value specified for it. You can only use this tag in wizard blocks.

The <tc:wizardParameter> tag:

Must always use the name attribute that references the parameter name.

Should not be inside the <tc:section> tag, unless you want to display parameters only if the same section includes the custom fields for the category during record creation.

Uses the following syntax:

<tc:wizardParameter name="ParameterName" appropriate attributes/>

oParameterName—the name (not label) of the parameter you want to include.

oappropriate attributes—the appropriate formatting attributes, if necessary.

For example, the following code displays two number fields, InjuredPersons and ClaimAmount. The ClaimAmount field, however, displays values with the dollar sign ($) before them because of the format attribute used with it:

<tc:wizardParameter name="InjuredPersons" />

<tc:wizardParameter name="ClaimAmount" format="DOLLAR"/>

For attributes that you can use with tc:wizardParameter, see Using Tag Attributes.

tc:wizardParameterLabel

This tag displays the label for a parameter field. Insert tc:wizardParameterLabel before the tc:wizardParameter tag to identify the field on the page. For certain field types, such as check-boxes, the label typically displays after the field. If the wizard uses text prompts, you may not need to include the label. You can only use this tag in wizard blocks.

The <tc:wizardParameterLabel> tag:

Must always use the name attribute that references the parameter name.

Uses the following syntax:

<tc:wizardParameterLabel name="ParameterName" />

oParameterName—The name (not label!) of the field you want to include.

For example, the following code displays the label "Method used to report the claim" of the parameter of type List with the name "HowReported":

<tc:wizardParameterLabel name="HowReported" />

For attributes that may be used with field labels, see Label Tags.

tc:blockTemplate

This tag displays the title of a custom block. TeamConnect defines the titles of system blocks.

The <tc:blockTemplate> tag:

Must appear exactly as shown.

Uses the following syntax:

<tc:blockTemplate blockTitle="title_text" />

tc:message

This tag allows localized messages to appear in custom blocks.

The <tc:message> tag:

Uses the following syntax:

<tc:message key="messageKey" />

omessageKey—Identification key for the corresponding value.

For example, the following code displays the value of a common custom key for welcome message text:

<tc:message key="custom.common.welcomeMessage" />

Note: Keys are defined in the Designer on the Custom Messages tab.

tc:messageParam

This tag, used with the <tc:message> tag, supplies the value for a parameter.

The <tc:messageParam> tag:

Must be nested inside a <tc:message> tag.

Replaces parameters in the order of the <tc:messageParam> tag.

May appear multiple times.

Uses the following syntax:

<tc:message key="messageKey">

<tc:messageParam value="value" />

</tc:message>

ovalue—Argument used to replace the parameter.

For example, if the defined custom.common value is welcome {0}, the code may appear as follows:

<tc:message key="custom.common.welcomeMessageWithUsername">

<tc:messageParam value="${cjb.currentUsername}" />

</tc:message>

Note: The Designer defines keys on the Custom Messages tab.