Harness and section forms - Adding a Column Repeat layout
A Column Repeat layout presents each item from the source in vertical table columns, typically with labels in the leftmost column.
Each column corresponds to items from one of the following sources:
-
Page List
orPage Group
property - Report definition
- Data page (instance of a data page rule).
The column can present embedded properties for each element, either as fields or formatted by a section. For an example, see How to present a repeating group as tabs or columns on a harness or flow action form.
Adding and deleting a Column 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 Column as the repeat type.
- Click OK.
To delete a Column Repeat layout, select the layout and click the Delete Row button. Do not use the Delete Cell button for this action.
Complete the Column Repeat panel — Top fields
Click the View properties icon to open the Column Repeat panel. Complete all tabs of the panel.
Your updates to this panel update the rule form upon clicking Apply. If the panel is pinned, the wireframe on the rule form changes immediately to reflect your inputs. If the panel is not pinned, click Apply to apply your inputs.
Field | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field | Description | ||||||||||||||||||||||||
Format |
Choose a format to control what appears above the layout (known as a header or
subheader), and the appearance of both the header or subheader and aspects of the
body.
This choice primarily affects styles and appearance. Information in or
below a subheader (including
Using the
Skin
rule, you can review or revise the styles (colors, fonts, padding and
margins) associated with each header or subheader format.
In the workform CSS style sheets, the various styles named
|
||||||||||||||||||||||||
HTML |
Available if you selected
Custom
for the Header field.
Identify here the second key part of an HTML rule that defines the contents of the
header.
|
||||||||||||||||||||||||
Title |
Optional. Enter text for the header or subheader, above the table. You can
include directives or JSP tags in this text.
Note:
When you plan to localize the
application using this rule, so the application can support users in various
languages or locales, choose the text carefully and limit text length to 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.
|
||||||||||||||||||||||||
Visible When |
Optional. Leave blank so that the entire Column Repeat layout is always
visible. To control the visibility of the layout, enter or select one of the
following:
As a best practice, use the Condition Builder to edit this field. Click the Gear icon to open the tool. See Using the Condition Builder to configure dynamic UI actions. Note: Use this to control visibility of the entire Column Repeat layout. Use the
Column Visible When condition on the Advanced tab to apply a condition to each
column at runtime.
|
||||||||||||||||||||||||
Source |
Specify the source of the data for the Column 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:
|
||||||||||||||||||||||||
Applies To |
Available when
Report Definition
is selected for the Source .
Specify the Applies To class of the report definition.
|
||||||||||||||||||||||||
Report Definition |
Available when
Report Definition
is selected for the Source .
Specify the Report Name key part of the report definition.
|
Complete the Column Repeat panel — General tab
Complete the General tab.
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Style |
Select the style to apply to the column repeat.
To specify a custom format in a skin, select Other as the Style and then select the format that you want to apply. |
||||||||||
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.
|
||||||||||
Header Type |
Select one of the following header styles. This field does not appear if the
Format value is
No Format ,
Header - Custom ,
Header - Hidden ,
SubHeader - Outline , or
SubHeader - Simple .
|
||||||||||
Allow Update |
For repeating layouts added to the harness, section, or flow action. select
this check box to allow users at run time to add a new column immediately to the
right of an existing column using the
Enter
key. For such repeating
layouts, this check box does not affect the appearance or function of the Add Column
and Delete Column operations. See Allowing users to append or delete Page List or
Page Group elements (columns)
Allowing users to append or delete Page List or Page Group
elements.
Note: Allow update is not available if the source if a report
definition.
|
||||||||||
Allow Reordering |
Select this check box to allow column reordering during runtime. A number for
each column that also serves as a drop and drag handle for reordering appears in
front of individual columns. If there is only one column and the Allow Reordering
check box is selected, a no sign appears, preventing reordering.
Note: Allow
reordering is not available if the source if a report definition.
|
||||||||||
Expand When |
Optional. Only applies to
Collapsible
header styles.
|
||||||||||
Defer Load |
This field appears when the Header Type is
Collapsible ,
Tabbed
or
Accordion . Select to postpone, at
runtime, the loading of the contents of this layout from the server until the user
clicks to make the body visible.
|
||||||||||
New Tab Group |
For Header Type of
Tabbed
only. Select to remove this tab
from the layout group, and add it as a new tab group directly below the original
group. Deselecting this property causes the separated tabs to merge back into the
original tab group. Deselecting this option causes the separated tabs to merge back
into the original tab group.
If this is the only tab in a group, this option is selected by default and cannot be changed. |
||||||||||
New Layout |
For Header Type of
Accordion
only. Select to remove this
layout from the layout group, and add it as a new group directly below the original
group. Deselecting this property causes the separated group to merge back into the
original group. Deselecting this option causes the separated group to merge back
into the original group.
If this is the only accordion in a group, this option is selected by default and cannot be changed. |
Complete the Column Repeat panel — Advanced tab
Field | Description |
---|---|
Column Visible When |
Optional. To control the visibility of one or more columns at runtime, enter
or select one of the following:
The when condition is evaluated for each element, and so can cause some columns to appear and other columns to be omitted. As a best practice, use the Condition Builder to edit this field. Click the Open condition builder icon to open the tool. See Using the Condition Builder to configure dynamic UI actions. |
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 text to supply a value for the
summary
attribute for the generated <TABLE> HTML element (used for screen readers). If
blank, the generated HTML uses the pyLabel value of the
Page List
or
Page Group
property for the attribute value.
|
Header Image |
Optional. Identify the second and third key part of a binary file rule
corresponding to a small image. Click the
Show Image Viewer
icon to open the Image Catalog (a pop-up version of the
Image Library landing page
). Select the binary file you wish to use. (Not
available when the Header value is
None
or
Custom .)
|
Append Activity |
This field is visible only when Allow Update is selected on the General tab.
Leave blank in most cases.
To override the default behavior when a user adds a column 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 columns after reaching a limit, or can compute additional properties for the page. This field is meaningful only for repeating layouts created in Version 5.2 or later that include an add icon. |
Delete Activity |
This field is visible only when
Allow Update
is
selected on the General tab. Leave blank in most cases.
To override the default behavior when a user deletes a column from 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. This field is meaningful only for repeating layouts created in Version 5.2 or later that include a delete icon. |
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 tabs in the group.
Complete the top field and General tab. There are no settings on the Advanced tab.
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. Standard — Default format applied to all tab groups. Sub — Format suitable for sub-tabs. Other — A custom style that you create in the skin rule. When you select this option, enter the style name in the Style field. |
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.
|
Adjusting row and column properties
To view or change row properties, click the circle at the left end of the row. Then click the View properties icon at the right end of the row.
For details, see SmartLayouts — Adjust Row Properties in Adding a layout .
Use the Column Properties panel change the type of a column, or to apply an inline style to all cells in the column.
To view or change column properties, click a column header and then click the View properties icon.
For details, see SmartLayouts — Adjust Column Properties in Adding a layout .
Working with the layout design
Use Windows drag operations to stretch or adjust the width of the table and of columns in the table.
The table initially contains four columns and two rows. Usually, the left-most column holds labels, the next column holds fields (property values), and the final columns contain the Delete Column and Add Column controls. When the section appears at runtime, the second column is repeated for each existing source element.
To reorder rows or columns within a repeating layout, you can select and drag a single row or column using the dots above or to the left of the table; these act as handles.
To duplicate rows or columns within a repeating layout:
-
Hold down the
Ctrl
key. - Select the row or column to be duplicated.
- Move the pointer to the destination.
-
Release the
Ctrl
key to drop a duplicate row or column.
Allowing users to append or delete Page List or Page Group elements (columns)
Optionally, when using a
Page List
or
Page Group
property as a source, users can add columns, delete columns, or both add and delete columns,
depending on which icons you include on the form.
When you first create a Column Repeat layout, a two-by-four table appears in the layout
(the third and fourth columns hold the icons for deleting and adding columns). Typically,
cells in the first column present labels, but these cells can also hold other property
values (not from the embedded
Page List
or
Page Group
pages). Cells in the rightmost two columns are typically used to present the Delete Column
icon and Add Column icon, but can also hold other property values (not from the embedded
Page List
or
Page Group
pages).
At runtime, the middle column appears once for each page. By default, users can add, append, and delete columns at runtime. You can change this default behavior:
- To allow column deletion but not column addition, select and then delete the Add Column icon that appears at the left of the third column. You can also delete the row containing this column.
- To allow column addition but not column deletion, select and delete the Delete Column icon that appears in the third column.
- To disallow both operations, delete both icons.
You can't delete the left-most and right-most columns. If they are not needed, you can apply a style that makes them not visible at runtime.
Optionally, you can use button controls or URL controls on the repeating layout rather than the standard icons for Add Column and Delete Column icons. The icon, button, or URL control can appear anywhere in the row.
Identifying subscript values for added Page Group pages
When a Column Repeat layout is based on a
Page Group
property and users
click the
Add Column
icon to append a new column, or press the
Enter
key to insert a new column, 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.
The 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 Column 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 column, it may be re-sorted to a
different position after the Submit is complete.