Harness and section forms — Adding a Tabbed Repeat layout
Use the Tabbed Repeat layout to present information sourced from a data report or a page list property as a series of tabs. The Tabbed Repeat layout provides a flexible user interface for projects where data changes often because the system updates the number of tabs automatically based on values in the source.
Adding and deleting Tabbed Repeat layout
From the Layout control group, select the Layout control. Click and drag the control. When the pointer changes shape to indicate that you can drop the layout, release the mouse button. A pop-up window opens to select the layout type:
- Click the Repeating radio button.
- Select Tabbed Repeat as the repeat type.
- Click OK.
To delete a Tabbed Repeat layout, select the layout and click the Delete Row button. Do not use the Delete Cell button for this action.
Complete the Tabbed Repeat panel
Click the View properties icon to open the Tabbed Repeat panel. Complete the General tab.
Field | Description |
---|---|
Source | Specify the source of the data for the Row Repeat layout:
Using a data page as the source To specify a data page as the source,
select |
List/Group | Available when Property is selected for the Source . Specify
one of the following:
|
Visibility | To control the visibility of the container, select one of the following:
Note: If this section is to become part of navigation in a composite portal,
you can make the header visible only when a specific space is the current space.
Enter an expression here similar to the
following:
Then select the
Run visibility condition on client check box. |
ID | Optional. Enter a name that becomes the ID=" " attribute value for the <TABLE > element. This option is useful when a JavaScript function refers to the table. |
Summary | Optional. Enter a summary. |
Append Activity | To override the default behavior when a user adds a row to the array, identify
the second key part of an activity to be called. Design your activity to accept the
same parameters as the default activity Work-.AppendToPageGroup
or Work-.AppendToPageList (which are final rules). For example, your activity can prevent users from adding tabs after reaching a limit, or can compute additional properties for the page. |
Delete Activity | To override the default behavior when a user deletes a row to the array, identify the second key part of an activity to be called. Design your activity to accept the same parameters as the default activity Work-.RemoveFromPageGroup or Work-.RemoveFromPageList (which are final rules). For example, your activity can require that at least one row remains, or that users can't delete the first row. |
Complete the Tabbed Repeat panel — Presentation tab
Container format |
Select a format for the container.
Select Other to select from custom container formats defined in the skin. In the field that is displayed, specify the custom format. |
Style |
Select a style for the layout.
Select Other to select from custom styles defined in the skin. In the field that is displayed, specify the custom style. |
Width | Optional. Select whether the column widths in the table are to be set at
runtime as a percentage of the total width of the user form or flow action form or
in absolute pixels. Choose:
CAUTION: If you choose px-fixed and a property value at runtime is
wider than width defined by the pixel value, the value is truncated, and users are
unable to see the full value.
|
Allow update |
Select this check box to allow users at runtime to add a new element immediately
after an existing element, using the
Enter
key. For such
repeating layouts, this check box does not affect the appearance or function of
the Add and Delete operations. See
Allowing users to append or delete Page List or Page Group elements (tabs).
Note: Allow update is not available if the source is a report definition.
|
Allow reorder |
Select this check box to allow for row reordering during runtime. A number for each row that doubles as a drop and drag handle for reordering will appear in front of individual rows. Numbering begins at 1 and continues for however many rows present. If there is only one row and the Allow Reordering check box is selected, a no sign ( ) appears, preventing reordering. Note:
Allow reorder
is not available if the source if a report
definition.
|
Display header and title |
Select if you want to display a header for the layout. Container settings appear
when you select this check box.
Note:
If you plan to localize the application using this rule, choose the text
carefully and limit the length to no more than 64 characters. When practical,
choose a caption already included in a language pack, to simplify later
localization. A field value rule with this text as the final key part is needed
for each locale. See
About the Localization wizard.
|
Tab Group properties panel
When you select a Header Style of
Tabbed
, the layout appears in a Tab
Group wireframe. Select it to make it active and click the
View
properties
icon in the header to open the Tab Group properties panel. Your
settings apply to all the tab headings in the group.
Top field
Field | Description |
---|---|
Format |
Select the format you want to apply to the tabs in the group. To configure the
format's appearance, access the Components tab in the Skin and then select
Tab
in the Layouts area.
|
General tab
Field | Description |
---|---|
Tab Position |
Select the placement of the tabs at runtime:
If you select
|
Tab Orientation | If you selected a left or right Tab Position , select to display tabs horizontally or vertically. Horizontal is the default. If you select vertical orientation, the tab title is rotated based on the tab position, left or right. |
Stretch Tabs |
Select to stretch the horizontally or vertically to fit the available space.
If the Tab Position is Top or Bottom, tabs stretch horizontally; if the Tab Position
is
Left
or Right, the tabs stretch vertically.
|
Define the Tab body in a section
The body of the tab control contains a single non-expandable cell. To define the body:
Create a section with an Applies To class that matches the Page Class of the Page Group or Page Class property.
- Add and define Label controls, InputBox controls, and so on to the section.
- Save the Section form.
- Return to the original rule form. Drag the section control and drop it in the single body cell of the Tabbed Repeat control.
- Save the form.
Allowing users to append or delete Page List or Page Group elements (tabs)
Optionally, users at runtime can add and delete tabs, depending on which icons you include on the form.
When you create a Tabbed Repeat layout, two icons appear. Users can add or remove tabs by default. You can change this default behavior by deleting the Add Tab icon or Delete Tab icon as needed.
Identifying subscript values for added Page Group pages
When a Tabbed Repeat layout is based on a
Page Group
property and users
click the Add Tab icon to append a new tab, or press the
Enter
key to
insert a new tab, the system requires a subscript value for the new page.
In a
Page Group
property, the embedded text property
pxSubscript
acts as a unique identifier for the pages. This value may also be
present in another property found on each page. As a best practice for usability, present
the
pxSubscript
property (as a read-only value) in the left column of each row.
In some cases, the set of allowable values for subscripts are limited to a predefined
static list, such as the codes for the 50 states of the United States (AL for Alabama
through WY for Wyoming). In other cases, the set of allowable values for subscripts is
unpredictable and effectively unrestricted, though each value must be a valid
Java identifier.
For example, a home insurance policy may contain a
Page Group
property with
a page for each insured property, with the property identified by a government-issued code.
Pega Platform includes standard rules that support both situations. Your application can override the standard rules to allow users to enter or select a subscript value.
-
Optionally, copy and override the standard section
@baseclass.SubScriptPromptInput
with another section of that name that
applies to the page class of the
Page Group
. Include only one input field on the section display. For example, if there are only a few allowed pxSubscript values, you can present the unused values as a set of radio buttons. -
Override the standard property
@baseclass.pxSubscript
with another
property of that name that applies to the page class of the
Page Group
. -
Optionally, select a Table Type of
Local List
orRemote List
on the General tab of the new property. Then, complete the table fields, to enumerate the allowable values as aLocal List
, or define aRemote List
that assembles the values dynamically. - Optionally, present the pxSubscript property as a read-only value in the top row of each column (or in another location meaningful to users).
- At run time, when users click the Add Tab icon, the system searches for a section named SubScriptPromptInput to allow the users to select a value. This display excludes the subscript values already in use. Make sure that this section prompts for only a single input.
Page
Group
property. After you append or insert a new tab, it may be re-sorted to a
different position after the Submit is complete.