TIBCO EBX®
Documentation > Developer Guide > Data model
Navigation modeDocumentation > Developer Guide > Data model

Custom forms

This chapter details how custom forms are defined and managed by TIBCO EBX®.

Related concepts

Access

To access it, go to: Data Models > Extensions > Custom forms > Forms

/access_custom.png

Click on the [+] button to create a form.

/add_form.png

Name your new form and indicate the table on which it will be available.

/name_form.png

Pressing the "Save" button will redirect you to the layout designer.

/display_form.png

Forms and components

Both forms and components can be created in the 'Custom forms' data model extension.

The editor

A form or component is just an imbrication of blocks. Blocks can represent a concrete graphical element or some piece of logic, allowing to have different layouts based on conditions like permissions, language, etc.

The workspace contains the description of the form, inside a predefined root block. Any block that is not connected to this root is grayed out, to mark it as inactive. To move a block, it must be dragged and dropped. Dragging a block also drags the blocks connected below it. If only one block has to be moved, hold the control key before clicking on it. Right-clicking on a block in the workspace also shows a list of options such as expand/collapse, comment, help, etc.

The toolbox on the left displays a list of categories. By clicking on a category, the blocks it contains are displayed. Some categories have a related 'Template' section. This section provides some combinations of the blocks of the section and can be considered as useful shortcuts or samples.

On the bottom right of the screen are the 'Preview' and 'Configure preview' buttons. These can be used to see what the form will look like.

/overview.png

Blocks

Here is the list of all the blocks that appear in the toolbox.

Arithmetic operator

Operations on two integers.

/block_integer_operator.png

Array

A list of items.

/block_array.png

See also

Array item

Adapter to make expression blocks into arrays.

See also

Boolean operator

Operations on two booleans.

/block_boolean_operator.png

Check box

Displays the checkbox widget.

/block_checkbox.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

label enabled?

If set, indicates if the item label is to be added next to the widget.

index

The index for this enumeration item.

specific nomenclature

If set, overrides the model-driven nomenclature.

Check box group

Displays the checkbox group widget.

/block_checkbox_group.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

columns number

If set, defines the number of columns to use for the layout of the checkboxes.

specific nomenclature

If set, overrides the model-driven nomenclature.

Children

Returns the list of the children of the given node.

/block_node_children.png

Parameters

Input

Description

node

The complex node from which to extract children.

Choose

A block returning the content of one of its inner 'when'/'otherwise' blocks.

/block_choose.png

Parameters

Input

Description

content

A list of 'when' blocks and optionally a final 'otherwise' block.

See also

Close button

Standard 'Close' button.

/block_button_close.png

Parameters

Input

Description

label

If set, overrides the default label.

default?

Indicates if this is the action to trigger when pressing 'Enter'. Only one button should be the default one.

Color picker

Displays the color picker widget.

/block_color_picker.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

Combo box

Displays the combo box widget.

/block_combo_box.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

create button displayable?

If set, defines if the create button should be displayed when the underlying node is a foreign key.

preview button displayable?

If set, defines if the preview button should be displayed when the underlying node is a foreign key.

number of entries displayed on a page

If set, defines the number of entries on each page of the drop-down list.

width of the combo box

If set, defines the width of the combo box.

advanced selector available?

If set, defines if the advanced selector should be displayed when the underlying node is a foreign key.

view name to use with the advanced selector

If set, defines the name of the published view that will be used in the combo-box selection of the associated foreign key field.

specific nomenclature

If set, overrides the model-driven nomenclature.

Comparator

Compares two integers.

/block_integer_comparator.png

Comparison

Compares strings, numbers or booleans.

/block_comparator.png

Concatenate arrays

Returns the concatenation of the given arrays.

/block_array_concat.png

Parameters

Input

Description

arrays

A list of arrays.

Constant

A constant value. Depending on the context, this value may be interpreted as text, boolean or number.

/block_constant.png

Parameters

Input

Description

value

Text, boolean or number.

Content title

Display the workspace content title.

/block_content_title.png

Parameters

Input

Description

label

The text to display.

horizontal alignment

The horizontal alignment of the element. If set, accepted values are: 'start', 'end', 'center'.

Creating record?

Returns a boolean indicating if the form is displayed in the context of a record creation or duplication.

/block_is_creating_record.png

Custom action bar

A custom action bar.

/block_custom_action_bar.png

Parameters

Input

Description

start

A list of 'Button's to display on the left of the action bar.

middle

A list of 'Button's to display on the center of the action bar.

end

A list of 'Button's to display on the right of the action bar.

Date time input

Displays the date/time input.

/block_date_time_input.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

date picker button displayable?

Indicates if the button opening the date picker is displayed (read/write mode only).

now button displayed?

Indicates if the button setting the date to the current time is displayed (read/write mode only).

Declare

The declaration of a variable, in a 'with' block.

/block_declare.png

Parameters

Input

Description

name

The name of the variable. Must be unique for a given 'with' block.

content

The value of the variable, which will be returned by 'var' blocks referencing this.

See also

Default action bar

The default action bar.

/block_default_action_bar.png

Default toolbar

The model-driven toolbar.

/block_default_toolbar.png

Duplicating record?

Returns a boolean indicating if the form is displayed in the context of a record duplication.

/block_is_duplicating_record.png

Expand/Collapse

Displays its content inside an expand/collapse block.

/block_expand_collapse.png

Parameters

Input

Description

label

Label displayed next to the arrow.

collapsed?

Indicates if the group is initially collapsed or not.

content

A list of components to be collapsible.

Flow

Displays its content in a fluid manner. If the elements don't fit in one row or column, they will wrap to start a new one.

/block_flow.png

Parameters

Input

Description

direction

'horizontal' or 'vertical', indicates in which direction to queue its content.

item spacing

The space between elements, in pixels.

content

A list of elements to display either horizontally or vertically.

For each

Returns an array that is made of the result of the 'body' function, applied on each item of the 'of' array.

/block_for_each.png

Parameters

Input

Description

item

The name of the variable containing the current item.

array

The array containing the items to transform.

return

What to return for the current item.

Form

Standard table-like layout with labels on the left side and values on the right side.

/block_form.png

Parameters

Input

Description

content

A list of 'Form row', 'Form group' or nodes. Nodes will result in model driven display, 'Form row' and 'Form group' allow to display custom content.

Form definition

Actual definition of a form.

/block_form_definition.png

Parameters

Input

Description

toolbar

Definition of the toolbar displayed on top of the form.

action bar

Definition of the action bar displayed below the form.

help URL

URL of the help page.

content

The content of the layout.

Form group

Inside a 'Form', displays a collapsible group of items.

/block_form_group.png

Parameters

Input

Description

node

If set, the group label, description and content will be model driven.

label

The label of the group. May override the model driven label if a node and a label are set.

description

The description of the group. May override the model driven description if a node and a description are set.

open?

Indicates if the group is initially open.

content

A list of 'Form row', 'Form group' or nodes. Nodes will result in model driven display, 'Form row' and 'Form group' allow to display custom content.

See also

Form row

Inside a 'Form' or a 'Form group', displays a row, that is basically a label and a value.

/block_form_row.png

Parameters

Input

Description

node

If set, the label, description and content will be model driven.

display label?

Indicates if the label should be displayed. If set to false in a 'Form' the content will span over both the label and content area.

label

The label of the row. May override the model driven label if a node and a label are set.

description

The description of the row. May override the model driven label if a node and a label are set.

content

The content to be displayed next to the label.

See also

Form parameter

The 'record' is the node representing the displayed record. 'current page' is a number (1 by default) representing the displayed page. This value can be changed by the 'Previous' and 'Next' buttons.

/block_form_parameter.png

From...get

Extract a value from an object or a node.

<from "node" get "path/to/value"> is equivalent to <var "node/path/to/value">

/block_get.png

Parameters

Input

Description

from

Base object or node, from which to extract data.

get

Path of the data to extract, inside the object in 'from'.

Function

The definition of an anonymous function. A function makes use of its parameters in its body to return a result.

/block_function.png

Parameters

Input

Description

parameters

List of 'param' blocks, defining the parameters accepted by this function.

body

Body describing the result of the function, using its parameters.

Function call

Calls a function by setting actual values to its parameters.

/block_call.png

Parameters

Input

Description

function

The function to call.

args

The arguments to pass to the function.

Function call argument

Actual value to pass to the parameter of the called function.

/block_argument.png

Parameters

Input

Description

name

The name of the parameter.

value

The actual value to pass the the parameter.

See also

Function parameter

This is the declaration of a parameter of a function.

/block_parameter.png

Parameters

Input

Description

name

The name of the parameter.

mandatory?

Indicates if this parameter must be provided by the caller.

default value

If set, this is the default value taken by this parameter if the caller does not provide one.

See also

Grid

A layout allowing to place components in a grid with coordinates.

/block_grid.png

Parameters

Input

Description

item spacing

Space between elements, in pixels.

content

A list of 'Grid element's, which specify where to display their content.

See also

Grid element

Inside a 'Grid', specifies the location of its content.

Parameters

Input

Description

row

The row where the element starts. Minimum value is 1.

column

The column where the element starts. Minimum value is 1.

width

The width of the element, in grid cells. Minimum value is 1.

height

The height of the element, in grid cells. Minimum value is 1.

vertical alignment

The vertical alignment of the element. If set, accepted values are: 'start', 'end', 'center'.

horizontal alignment

The horizontal alignment of the element. If set, accepted values are: 'start', 'end', 'center'.

content

The content inside the cell.

See also

If

A block returning either the content of 'then', or the content 'else', based on the result of the test.

/block_if.png

Parameters

Input

Description

test

A test determining which value to return. This must be a boolean value.

then

The value returned if the test is true.

else

The value returned if the test is false.

Input parameter

Returns the raw value of an input parameter.

/block_input_parameter.png

Parameters

Input

Description

name

The parameter name.

In role?

Returns a boolean indicating if the current user has the requested role.

/block_is_in_role.png

Label

Displays the label of the given node.

/block_label.png

Parameters

Input

Description

node

The node for which to display the label.

Localized

Block which result depends on the user locale.

/block_localized.png

Parameters

Input

Description

[locale]

Each parameter relates to a locale. The result of the block will be the one corresponding to the locale of the current user.

Message

Formats the given text by replacing java-like {0}, {1}, etc. placeholders by the argument at the given index.

/block_message.png

Parameters

Input

Description

pattern

Text with placeholders ({0}, {1}, etc.) which will be replaced by the given arguments.

arguments

The list of values which will replace the placeholders in the pattern.

Next button

A button which will increment the 'current page' value by one.

/block_button_next.png

Parameters

Input

Description

label

If set, overrides the default label.

default?

Indicates if this is the action to trigger when pressing 'Enter'. Only one button should be the default one.

Node

Overrides the definition of an existing node.

/block_node.png

Parameters

Input

Description

base

The node to override.

mandatory?

If set, overrides the mandatory indicator of the base node.

label

If set, overrides the label of the node.

description

If set, overrides the label of the node.

widget

If set, overrides the default widget of the node.

Nomenclature item

A nomenclature item is a (key, label) pair.

/block_nomenclature_item.png

Parameters

Input

Description

value

The value of the item.

label

The label of the item.

Not

Returns the inverse of the given boolean.

/block_not.png

Object

An object composed of a list of (key, value) pairs.

/block_object.png

Parameters

Input

Description

content

A list of 'property' blocks.

See also

Otherwise

Final choice in a 'choose' block. Will be returned if no 'when' case matched.

/block_otherwise.png

Parameters

Input

Description

content

The value to return if no 'when' case matched.

See also

Paragraph title

Display a paragraph title.

/block_paragraph_title.png

Parameters

Input

Description

label

The text to display.

horizontal alignment

The horizontal alignment of the element. If set, accepted values are: 'start', 'end', 'center'.

Password

Displays the input password widget.

/block_password.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

Previous button

A button which will decrement the 'current page' value by one.

/block_button_previous.png

Parameters

Input

Description

label

If set, overrides the default label.

default?

Indicates if this is the action to trigger when pressing 'Enter'. Only one button should be the default one.

Property

A property of an object.

/block_object_property.png

Parameters

Input

Description

name

Name of the property. Must be unique for a given object.

value

Value of the property.

Radio button

Displays a radio button widget.

/block_radio_button.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

label enabled?

If set, indicates if the item label is to be added next to the widget.

index

The index for this enumeration item.

specific nomenclature

If set, overrides the model-driven nomenclature.

Radio button group

Displays the radio button group widget.

/block_radio_button_group.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

columns number

If set, defines the number of columns to use for the layout of the radio buttons.

specific nomenclature

If set, overrides the model-driven nomenclature.

Revert button

Standard 'Revert' button.

/block_button_revert.png

Parameters

Input

Description

label

If set, overrides the default label.

default?

Indicates if this is the action to trigger when pressing 'Enter'. Only one button should be the default one.

Save button

Standard 'Save' button.

/block_button_save.png

Parameters

Input

Description

label

If set, overrides the default label.

default?

Indicates if this is the action to trigger when pressing 'Enter'. Only one button should be the default one.

Save and close button

Standard 'Save and close' button.

/block_button_save_and_close.png

Parameters

Input

Description

label

If set, overrides the default label.

default?

Indicates if this is the action to trigger when pressing 'Enter'. Only one button should be the default one.

Tab

A tab, inside a 'Tab container'.

/block_tab.png

Parameters

Input

Description

node

If present, the tab title, description and content will be model driven.

title

The title of the tab. May override the model driven title if a node and a title are set.

description

The description of the tab. May override the model driven description if a node and a description are set.

content

The content of the tab. May override the model driven content if a node and a content are set.

See also

Tab container

A container of tabs, which displays a list of tab names and one active tab.

/block_tab_container.png

Parameters

Input

Description

content

A list of 'Tab's.

See also

Text input

Displays the text input widget.

/block_text_input.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

height

If set, defines the height of the widget, in pixels.

width

If set, defines the width of the widget, in pixels.

multiline?

If set, defines if the widget spans over multiple lines.

background

If set, defines the background color, in hexadecimal format.

foreground

If set, defines the foreground color, in hexadecimal format.

Toolbar named

The toolbar having the specified name.

/block_toolbar_named.png

Parameters

Input

Description

name

The name of the toolbar to display.

Variable

A reference to a variable declared by a 'with...declare' block. A path is also accepted if the variable is an object or a node.

/block_variable.png

Parameters

Input

Description

expression

A reference to a variable declared by a 'with...declare' block. A path is also accepted if the variable is an object or a node.

When

A choice in a 'choose' block. If the test is true, the 'then' content will be returned, otherwise the next block will be tested.

/block_when.png

Parameters

Input

Description

when

A boolean test indicating if this case should be resolved.

then

If the test is true, this value will be returned.

See also

Widget

Displays the default widget.

/block_widget.png

Parameters

Input

Description

node

The node for which to display the widget.

readonly?

Indicates if the widget should be in readonly mode.

With

Declares variables that can be used in its 'return' statement.

/block_with.png

Parameters

Input

Description

variables

A list of 'declare' blocks.

return

The value to return. The variables declared in the 'variables' statement can be used here, with 'var' blocks.

See also
Documentation > Developer Guide > Data model