Skip to content

Class: PageProxy

PageProxy is a developer-facing interface that provides access to a page. It is passed to rules to provide access to the page for application specific customizations.

Hierarchy

Implements

Summary

Constructors

Properties

Class Properties

Currently none in this class.

Inherited Properties

Accessors

Class Accessors

Currently none in this class.

Inherited Accessors

Methods

Class Methods

Inherited Methods

Constructors

constructor

+ new PageProxy(context: IContext): PageProxy

Overrides ClientAPI.constructor

Parameters:

Name Type
context IContext

Returns: PageProxy

Methods

Protected _getExecuteSource

_getExecuteSource(): ExecuteSource

Overrides ClientAPI._getExecuteSource

Returns: ExecuteSource


executeCustomEvent

executeCustomEvent(eventType: string, eventData: any): Promise‹void›

Implementation of IPageProxy

Executes rule specified as page level custom event.

Parameters:

Name Type Description
eventType string can be used to describe the current event.
eventData any Data that is passed to the associated rule.

Returns: Promise‹void›


getActionBinding

getActionBinding(): any

Implementation of IPageProxy

Get the binding to be used by the current action. For example, a navigation action would set this to pass on the binding for the next page which is navigated to.

Returns: any


getCaption

getCaption(): string

Implementation of IPageProxy

Returns: string

the caption of the page. If the caption is not defined, returns empty string


getControl

getControl(name: string): IControlProxy

Implementation of IPageProxy

Get the control based on the name

Parameters:

Name Type Description
name string the name of the control to match

Returns: IControlProxy


getControls

getControls(): IControlProxy[]

Implementation of IPageProxy

Get all the child controls for this container

Returns: IControlProxy[]


getExecutedContextMenuItem

getExecutedContextMenuItem(): ContextItem

Implementation of IPageProxy

return the most recent swipe item on this page.

Returns: ContextItem


getFilter

getFilter(): IFilterable

return the filtered control passed into this page.

Returns: IFilterable


getFioriToolbar

getFioriToolbar(): IFioriToolbarProxy

Implementation of IPageProxy

Returns: IFioriToolbarProxy

return the FioriToolbarProxy instance of the associated fiori toolbar of that page


getMissingRequiredControls

getMissingRequiredControls(): Object[]

Implementation of IPageProxy

After running a CheckRequiredFields action, this method is to return a list of any controls whose value were found to be missing when required.

Returns: Object[]


getPageProxy

getPageProxy(): IPageProxy

Implementation of IPageProxy

Returns: IPageProxy

the Page self


getPressedItem

getPressedItem(): PressedItem

Implementation of IPageProxy

return the control, toolbar item or action bar item that was most recently pressed on this page.

Returns: PressedItem


getToolbar

getToolbar(): IToolbarProxy

Implementation of IPageProxy

Returns: IToolbarProxy

return the ToolbarProxy instance of the associated toolbar of that page


redraw

redraw(): void

Implementation of IPageProxy

Redraw the page

Returns: void


setActionBarItemVisible

setActionBarItemVisible(item: any, visibleFlag: boolean): void

Implementation of IPageProxy

Set specified actionBar item on page to visible/hidden

Parameters:

Name Type Description
item any either an number or a string the number is the position of the item.(zero based, first item on actionBar is 0 and second is 1 etc.) the string is the _Name parameter of the action item
visibleFlag boolean if true set item to visible else hidden.

Returns: void


setActionBinding

setActionBinding(binding: Object): this

Implementation of IPageProxy

Set the binding to be used by the current action. For example, a navigation would set this to pass on the binding for the next page which is navigated to.

Parameters:

Name Type
binding Object

Returns: this


setCaption

setCaption(caption: string): void

Implementation of IPageProxy

Set the page caption

Parameters:

Name Type Description
caption string the caption of the page

Returns: void


setStyle

setStyle(styleClass: string, subControl: string): this

Implementation of IPageProxy

Apply styles to a control

Parameters:

Name Type Default Description
styleClass string - The name of the style class to be applied
subControl string "" The name of the control to apply the style to. It could be either 'ActionBar' or 'ToolBar'. If this is '', the style is applied to the entire page.

Returns: this

this for chaining

See Styles/ docs for details.


setToolbarItemCaption

setToolbarItemCaption(toolbarItemName: string, newCaption: string): Promise‹any›

Implementation of IPageProxy

Asynchronously apply a new caption to a toolbar item on page

Parameters:

Name Type Description
toolbarItemName string the name of the item to modify caption
newCaption string the new caption

Returns: Promise‹any›