MapElement Class Methods

In this section, the MapElement class methods are presented in alphabetical order.

Syntax

GetJavaScript(JS_event)

Description

Use this method to return the JavaScript function call associated with the specified JavaScript event.

The JavaScript event and its associated function call are defined in the JavaScript Events group box on the page element’s properties page. See Defining JavaScript Events for Page Element Properties for more information.

Parameters

Field or Control

Definition

JS_event

Specifies the JavaScript event as a String.

Returns

A String value.

Syntax

GetListviewDefinedItemClass(listview_item_type)

Description

Use this method to return the class for the specified predefined list view item type.

Parameters

Field or Control

Definition

listview_item_type

Indicates which predefined list view item type as an Integer constant. Specify the value as one of the following constants:

Constant Value

%MAP_LV_Title

%MAP_LV_Desc

%MAP_LV_Count

%MAP_LV_Aside

%MAP_LV_Attr

%MAP_LV_Divider

%MAP_LV_DynImage

%MAP_LV_DynUrl

Returns

A String value.

Syntax

GetListviewDefinedItemHidden(listview_item_type)

Description

Use this method to return whether the specified predefined list view item type is hidden.

Parameters

Field or Control

Definition

listview_item_type

Indicates which predefined list view item type as an Integer constant. Specify the value as one of the following constants:

Constant Value

%MAP_LV_Title

%MAP_LV_Desc

%MAP_LV_Count

%MAP_LV_Aside

%MAP_LV_Attr

%MAP_LV_Divider

%MAP_LV_DynImage

%MAP_LV_DynUrl

Returns

A Boolean value: True if the predefined list view item type is hidden, False otherwise.

Syntax

GetListviewDefinedItemStyle(listview_item_type)

Description

Use this method to return the style for the specified predefined list view item type.

Parameters

Field or Control

Definition

listview_item_type

Indicates which predefined list view item type as an Integer constant. Specify the value as one of the following constants:

Constant Value

%MAP_LV_Title

%MAP_LV_Desc

%MAP_LV_Count

%MAP_LV_Aside

%MAP_LV_Attr

%MAP_LV_Divider

%MAP_LV_DynImage

%MAP_LV_DynUrl

Returns

A String value.

Syntax

GetListviewItemClass(index)

Description

Use this method to return the class for the specified user-defined list view item column.

Parameters

Field or Control

Definition

index

Specifies which user-defined list view item column as an Integer.

Returns

A String value.

Syntax

GetListviewItemHidden(index)

Description

Use this method to return whether the specified user-defined list view item column is hidden.

Parameters

Field or Control

Definition

index

Specifies which user-defined list view item column as an Integer.

Returns

A Boolean value: True if the user-defined list view item column is hidden, False otherwise.

Syntax

GetListviewItemStyle(index)

Description

Use this method to return the style for the specified user-defined list view item column.

Parameters

Field or Control

Definition

index

Specifies which user-defined list view item column as an Integer.

Returns

A String value.

Syntax

GetMobileGridClass(grid_column)

Description

Use this method to return the class for the specified mobile grid column.

Parameters

Field or Control

Definition

grid_column

Indicates which mobile grid column as a String constant. Specify the value as one of the following constants:

Constant Value

Description

%MAP_MOBILE_CLASS_ONE

Mobile grid column 1.

%MAP_MOBILE_CLASS_TWO

Mobile grid column 2.

%MAP_MOBILE_CLASS_THREE

Mobile grid column 3.

%MAP_MOBILE_CLASS_FOUR

Mobile grid column 4.

%MAP_MOBILE_CLASS_FIVE

Mobile grid column 5.

Returns

A String value.

Syntax

GetMobileGridStyle(grid_column)

Description

Use this method to return the style for the specified mobile grid column.

Parameters

Field or Control

Definition

grid_column

Indicates which mobile grid column as a String constant. Specify the value as one of the following constants:

Constant Value

Description

%MAP_MOBILE_STYLE_ONE

Mobile grid column 1.

%MAP_MOBILE_STYLE_TWO

Mobile grid column 2.

%MAP_MOBILE_STYLE_THREE

Mobile grid column 3.

%MAP_MOBILE_STYLE_FOUR

Mobile grid column 4.

%MAP_MOBILE_STYLE_FIVE

Mobile grid column 5.

Returns

A String value.

Syntax

SetJavaScript(JS_event, JS_function)

Description

Use this method to set the JavaScript function name for the specified JavaScript event

The JavaScript event and its associated function call are defined in the JavaScript Events group box on the page element’s properties page. See Defining JavaScript Events for Page Element Properties for more information.

Parameters

Field or Control

Definition

JS_event

Specifies the JavaScript event as a String.

JS_function

Specifies the JavaScript function to call as a String.

Returns

None

Example

The following example sets the JavaScript function call to UpdateField():

&Element.SetJavaScript("onclick", "UpdateField()");

Syntax

SetListviewDefinedItemClass(listview_item_type, class)

Description

Use this method to set the class for the specified predefined list view item type.

Parameters

Field or Control

Definition

listview_item_type

Indicates which predefined list view item type as an Integer constant. Specify the value as one of the following constants:

Constant Value

%MAP_LV_Title

%MAP_LV_Desc

%MAP_LV_Count

%MAP_LV_Aside

%MAP_LV_Attr

%MAP_LV_Divider

%MAP_LV_DynImage

%MAP_LV_DynUrl

Field or Control

Definition

class

Specifies the class as a String.

Returns

None.

Syntax

SetListviewDefinedItemHidden(listview_item_type, hidden)

Description

Use this method to set whether the specified predefined list view item type is hidden.

Parameters

Field or Control

Definition

listview_item_type

Indicates which predefined list view item type as an Integer constant. Specify the value as one of the following constants:

Constant Value

%MAP_LV_Title

%MAP_LV_Desc

%MAP_LV_Count

%MAP_LV_Aside

%MAP_LV_Attr

%MAP_LV_Divider

%MAP_LV_DynImage

%MAP_LV_DynUrl

Field or Control

Definition

hidden

Specifies whether the predefined list view item type is hidden as a Boolean.

Returns

None.

Example

The following example hides the Description column in the list view.

&Element.SetListviewDefinedItemHidden(%MAP_LV_Desc, True);

Syntax

SetListviewDefinedItemRowControl(row_num, listview_item_type, listview_item_control, value)

Description

Use this method to set the control value for a predefined list view item type in the specified row.

Parameters

Field or Control

Definition

row_num

Specifies the row number as an Integer.

listview_item_type

Indicates which predefined list view item type as an Integer constant. Specify the value as one of the following constants:

Constant Value

%MAP_LV_Title

%MAP_LV_Desc

%MAP_LV_Count

%MAP_LV_Aside

%MAP_LV_Attr

%MAP_LV_Divider

%MAP_LV_DynImage

%MAP_LV_DynUrl

Field or Control

Definition

listview_item_control

Indicates which list view item control as an Integer constant. Specify the value as one of the following constants:

Constant Value

Description

%MAP_LV_Item_Class

Class for the list view item.

%MAP_LV_Item_Style

Style for the list view item.

%MAP_LV_Item_Access

Alternative text for the list view item (for accessibility).

%MAP_LV_Item_Attr

jQuery attributes for the list view item to override defaults.

Field or Control

Definition

value

Specifies the value for the control as a string.

Returns

None.

Example

The following example sets color for the Title column in the fifth row of the list view.

&Element.SetListviewDefinedItemRowControl(5, %MAP_LV_Title, %MAP_LV_Item_Style, "color:red");

Syntax

SetListviewDefinedItemStyle(listview_item_type, style)

Description

Use this method to set the style for the specified predefined list view item type.

Parameters

Field or Control

Definition

listview_item_type

Indicates which predefined list view item type as an Integer constant. Specify the value as one of the following constants:

Constant Value

%MAP_LV_Title

%MAP_LV_Desc

%MAP_LV_Count

%MAP_LV_Aside

%MAP_LV_Attr

%MAP_LV_Divider

%MAP_LV_DynImage

%MAP_LV_DynUrl

Field or Control

Definition

style

Specifies the style as a String.

Returns

None.

Example

The following example sets color for the Aside column in the list view.

&Element.SetListviewDefinedItemStyle(%MAP_LV_Aside, "color:red");

Syntax

SetListviewDisableURL(row_num)

Description

Use this method to disable the URL for the row if a URL has been defined.

Parameters

Field or Control

Definition

row_num

Specifies the row number as an Integer.

Returns

None.

Syntax

SetListviewItemClass(index, class)

Description

Use this method to set the class for the specified user-defined list view item column.

Parameters

Field or Control

Definition

index

Specifies which user-defined list view item column as an Integer.

class

Specifies the class as a String.

Returns

None.

Syntax

SetListviewItemHidden(index, hidden)

Description

Use this method to specify whether the specified user-defined list view item column is hidden.

Parameters

Field or Control

Definition

index

Specifies which user-defined list view item column as an Integer.

hidden

Specifies whether the column is hidden as a Boolean.

Returns

None.

Example

The following example specifies that the first user-defined item column in the list view is visible:

&Element.SetListviewItemHidden(1, False);

Syntax

SetListviewItemRowControl(row_num, index, listview_item_control, value)

Description

Use this method to set the control value for a user-defined list view column in the specified row.

Parameters

Field or Control

Definition

row_num

Specifies the row number as an Integer.

index

Specifies which user-defined list view column as an Integer.

listview_item_control

Indicates which list view item control as an Integer constant. Specify the value as one of the following constants:

Constant Value

Description

%MAP_LV_Item_Class

Class for the list view item.

%MAP_LV_Item_Style

Style for the list view item.

%MAP_LV_Item_Access

Alternative text for the list view item (for accessibility).

%MAP_LV_Item_Attr

jQuery attributes for the list view item to override defaults.

Field or Control

Definition

value

Specifies the value for the control as a string.

Returns

None.

Example

The following example sets color for the fifth user-defined column in the second row of the list view.

&Element.SetListviewItemRowControl(2, 5, %MAP_LV_Item_Style, "color:yellow");

Syntax

SetListviewItemStyle(index, style)

Description

Use this method to set the class for the specified user-defined list view item column.

Parameters

Field or Control

Definition

index

Specifies which user-defined list view item column as an Integer.

style

Specifies the style as a String.

Returns

None.

Example

The following example sets the color for the second user-defined item column in the list view.

&Element.SetListviewItemStyle(2, "color:yellow");

Syntax

SetListviewRowControl(row_num, listview_item_control, value)

Description

Use this method to set the control value for all list view columns in the specified row.

Parameters

Field or Control

Definition

row_num

Specifies the row number as an Integer.

listview_item_control

Indicates which list view item control as an Integer constant. Specify the value as one of the following constants:

Constant Value

Description

%MAP_LV_Item_Class

Class for the list view item.

%MAP_LV_Item_Style

Style for the list view item.

%MAP_LV_Item_Access

Alternative text for the list view item (for accessibility).

%MAP_LV_Item_Attr

jQuery attributes for the list view item to override defaults.

Field or Control

Definition

value

Specifies the value for the control as a string.

Returns

None.

Syntax

SetMobileGridClass(grid_column, class)

Description

Use this method to set the class for the specified mobile grid column.

Parameters

Field or Control

Definition

grid_column

Indicates which mobile grid column as a String constant. Specify the value as one of the following constants:

Constant Value

Description

%MAP_MOBILE_CLASS_ONE

Mobile grid column 1.

%MAP_MOBILE_CLASS_TWO

Mobile grid column 2.

%MAP_MOBILE_CLASS_THREE

Mobile grid column 3.

%MAP_MOBILE_CLASS_FOUR

Mobile grid column 4.

%MAP_MOBILE_CLASS_FIVE

Mobile grid column 5.

Field or Control

Definition

class

Specifies the class as a String value.

Returns

None.

Example

The following example sets the class for the second column of a mobile grid:

&Element.SetMobileGridClass(%MAP_MOBILE_CLASS_TWO, "myClass");

Syntax

SetMobileGridStyle(grid_column, style)

Description

Use this method to set the style for the specified mobile grid column.

Parameters

Field or Control

Definition

grid_column

Indicates which mobile grid column as a String constant. Specify the value as one of the following constants:

Constant Value

Description

%MAP_MOBILE_STYLE_ONE

Mobile grid column 1.

%MAP_MOBILE_STYLE_TWO

Mobile grid column 2.

%MAP_MOBILE_STYLE_THREE

Mobile grid column 3.

%MAP_MOBILE_STYLE_FOUR

Mobile grid column 4.

%MAP_MOBILE_STYLE_FIVE

Mobile grid column 5.

Field or Control

Definition

style

Specifies the style as a String value.

Returns

None.

Syntax

SetTableColumnProperty(tbl_col_control, value)

Description

Use this method to set the value of the specified control (either class or style) for the table column.

Parameters

Field or Control

Definition

tbl_col_control

Indicates which control as an Integer.

Constant Value

Description

%MAP_CLASS

Class for the table column.

%MAP_STYLE

Style for the table column.

Field or Control

Definition

value

Specifies the value of the control as a String.

Returns

None.

Syntax

SetTableGridRowControl(row_num, setting, new_value)

Description

Use the SetTableGridRowControl method to override the default setting for a table or grid and specify a different setting value for each row of the table or grid. For each row, you can change these settings using these Integer constants:

  • %MAP_TG_Class - Override the class for the row.

  • %MAP_TG_Style - Override the style for the row.

  • %MAP_TG_Access - Override the accessibility setting for the row.

  • %MAP_TG_Attr - Override the attribute for the row.

  • %MAP_TG_Image - Override the image for the row.

  • %MAP_TG_URLOvrd - Override the row-click URL.

Parameters

Field or Control

Definition

row_num

Specifies the table or grid row number as a Integer value.

setting

Specifies the setting to be overridden as an Integer constant.

new_value

Specifies the new value for the setting as a String value.

Returns

None.

Example

&Element = &Map.GetElement("STRING_FOUR__5");
&Element.SetTableGridRowControl(1, %MAP_TG_Image, %IntBroker.GetImageURL("MAP_INVOICE"));