pp108 : Navigator

Navigator

It refers to the navigator object associated with the view or component.
The navigator object comprises the control bar as well as the pagination bar. These bars are used to navigate and view records, and also to insert, delete, and refresh records available in the model.
This is a read-only property. It can be set during design time.

The syntax is as below:

Designtime

This property can be set through the property sheet of the control by selecting the control bar and pagination bar options of the control.

Script

oNavigator = viewID.navigator or oNavigator = componentID.navigator

Parameter

Description

oNavigator

Object that refers to the navigator object associated with the view or component

The property returns the navigator object that contains the control bar and the pagination bar of the view or component, if present. This can be used to manipulate the pagination buttons or their methods, or to disable, enable, hide, and show the pagination buttons available in the bar.

Design-time property

Runtime property

Description

ID

Sets the string that identifies the element bar button on an XForm. If not specified, a unique ID is automatically generated.

Tab Index

tabIndex

Sets and retrieves the position of the current button in the tabbing order for the current XForm.

Tooltip

title

Sets the tool tip that appears on a button when the mouse is moved over it. Programmatically, this property is set by specifying the title property of the button.

Task Part

Creates a task part for the button. Selecting the check box, displays the Task Part pane.

insertButton

Retrieves a handle to the Insert button object present on the Control Bar of the control.

deleteButton

Retrieves a handle to the Delete button object present on the Control Bar of the control.

refreshButton

Retrieves a handle to the Refresh button object present on the Control Bar of the control.

firstButton

Retrieves a handle to the First button object present on the Pagination Bar of the control.

previousButton

Retrieves a handle to the Previous button object present on the Pagination Bar of the control.

findButton

Retrieves a handle to the Find button object present on the Pagination Bar of the control.

nextButton

Retrieves a handle to the Next button object present on the Pagination Bar of the control.

lastButton

Retrieves a handle to the Last button object present on the Pagination Bar of the control.

showAllButton

Retrieves a handle to the Show All button object present on the Pagination Bar of the control.

Event

Description

onafterdelete

This event is activated after the successful deletion of a business object from the dataset. This event will not be executed if the onbeforedelete event is cancelled.

onafterfind

This event is activated after a business object is found in the dataset when searched for using the Find button.

onafterfirst

This event is activated after the first set business objects for the dataset is fetched.

onafterinsert

This event is activated after the successful insertion of a business object in the dataset. This event will not execute if the onbeforeinsert event is cancelled.

onafterlast

This event is activated after the last set of business objects for the dataset is fetched.

onafternext

This event is activated after the next set of business objects for the dataset is fetched.

onafterprevious

This event is activated after the previous set of business objects for the dataset is fetched.

onafterrefresh

This event is activated after the view or component is refreshed. This event will not be executed if the onbeforerefresh event is cancelled.

onaftershowall

This event is activated after the data from the backend of the current model is retrieved and displayed using the Show All button.

onbeforedelete

This event is activated before the deletion of a business object in the dataset. This event has a returnValue property, which when set to False, will cancel the firing of the event.

onbeforefind

This event is activated before a business object is searched for in the dataset by using the Find button.

onbeforefirst

This event is activated before the first set of business objects for the dataset is fetched.

onbeforeinsert

This event is activated before the insertion of a business object in the dataset. This event has a returnValue property, which when set to false, will cancel the firing of the event.

onbeforelast

This event is activated when the last set of business objects for the dataset is fetched.

onbeforenext

This event is activated before the next set of business objects for the dataset is fetched.

onbeforeprevious

This event is activated before the previous set of business objects for the dataset is fetched.

onbeforerefresh

This event is activated before the data in the view or component is refreshed. This event has a returnValue property, which when set to false, will cancel the firing of the event.

onbeforeshowall

This event is activated before all data from the backend is retrieved for the current model and displayed using the Show All button.

Method

Description

addListener()

This method registers the control to receive notifications for an event.

hide (sButtonName )

This method hides the navigator object and its buttons based on the parameter passed.

removeListener()

This method unregisters the control to cease receiving notifications for its events.

show (sButtonName )

This method displays the navigator object and its buttons based on the parameter passed.

This code demonstrates how the property can be used.

//Get the navigator and hide the navigation buttons
var navigator = newView.navigator; 
if (! navigator) return;
//Hide the navigational(pagination) buttons from the page
navigator.hide("navigation");
//Hide the control bar buttons from the page
navigator.hide("control");

Group, Table, Groupbox, View

Related reference

Navigator