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>

Executes rule specified as page level custom event.

Implementation of IPageProxy.executeCustomEvent

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>


getActionBar

getActionBar(): IActionBarProxy

Implementation of IPageProxy.getActionBar

Returns: IActionBarProxy

return the ActionBarProxy instance of the associated actionbar of that page


getActionBinding

getActionBinding(): any

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.

Implementation of IPageProxy.getActionBinding

Returns: any


getCaption

getCaption(): string

Implementation of IPageProxy.getCaption

Returns: string

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


getControl

getControl(name: string): IControlProxy

Get the control based on the name

Implementation of IPageProxy.getControl

Parameters:

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

Returns: IControlProxy


getControls

getControls(): IControlProxy[]

Get all the child controls for this container

Implementation of IPageProxy.getControls

Returns: IControlProxy[]


getExecutedContextMenuItem

getExecutedContextMenuItem(): ContextItem

return the most recent swipe item on this page.

Implementation of IPageProxy.getExecutedContextMenuItem

Returns: ContextItem


getFilter

getFilter(): IFilterable

return the filtered control passed into this page.

Returns: IFilterable


getFioriToolbar

getFioriToolbar(): IFioriToolbarProxy

Implementation of IPageProxy.getFioriToolbar

Returns: IFioriToolbarProxy

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


getMissingRequiredControls

getMissingRequiredControls(): Object[]

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

Implementation of IPageProxy.getMissingRequiredControls

Returns: Object[]


getName

getName(): string

return the name passed into this page.

Implementation of IPageProxy.getName

Returns: string


getPageProxy

getPageProxy(): IPageProxy

Implementation of IPageProxy.getPageProxy

Returns: IPageProxy

the Page self


getPressedItem

getPressedItem(): PressedItem

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

Implementation of IPageProxy.getPressedItem

Returns: PressedItem


getToolbar

getToolbar(): IToolbarProxy

Implementation of IPageProxy.getToolbar

Returns: IToolbarProxy

return the ToolbarProxy instance of the associated toolbar of that page


redraw

redraw(): void

Redraw the page

Implementation of IPageProxy.redraw

Returns: void


setActionBarItemVisible

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

Set specified actionBar item on page to visible/hidden

Implementation of IPageProxy.setActionBarItemVisible

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): PageProxy

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.

Implementation of IPageProxy.setActionBinding

Parameters:

Name Type
binding Object

Returns: PageProxy


setCaption

setCaption(caption: string): void

Set the page caption

Implementation of IPageProxy.setCaption

Parameters:

Name Type Description
caption string the caption of the page

Returns: void


setStyle

setStyle(styleClass: string, subControl?: string = ''): PageProxy

Apply styles to a control

Implementation of IPageProxy.setStyle

Parameters:

Name Type 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: PageProxy

this for chaining

See Styles/ docs for details.


setToolbarItemCaption

setToolbarItemCaption(toolbarItemName: string, newCaption: string): Promise<any>

Asynchronously apply a new caption to a toolbar item on page

Implementation of IPageProxy.setToolbarItemCaption

Parameters:

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

Returns: Promise<any>