- Since:
- 26.1
Extends
The jQuery object for the region element.
Type:
- jQuery
- Inherited From:
Example
Get option element after initialization.
var value = apex.region( "myRegionId" ).element;
The Interactive Report region type is "InteractiveReport".
Type:
- string
- Overrides:
Set focus to the Interactive Report if possible. If the report supports selection then the last focused (current) row will be focused. Otherwise, the first focusable element within the region, if any, will be focused.
- Overrides:
Example
This example puts focus in the report.
apex.region( "regionDomId" ).focus();
Returns the current row as a jQuery object. The current row is the row that has or last had focus.
This is only applicable if the report supports selection.
Returns:
- Type
- jQuery
Example
This example gets the current row in the report.
var current$ = apex.region( "regionDomId" ).getCurrentRow();
console.log( "make use of current row", current$ );
Returns the value of the current row.
The current row is the row that has or last had focus.
The value of a row is its primary key in the data-id attribute.
This is only applicable if the report supports selection.
Returns:
- Type
- string
Returns the value for each selected row.
The value of a row is its primary key in the data-id attribute
This is only applicable if the report supports selection.
Returns:
- Type
- Array.<string>
Return the currently selected rows as a jQuery collection.
This is only applicable if the report supports selection.
Because this returns a jQuery collection it can only return selected rows that are currently in the DOM. To get a more complete selection result, not just the ones in the DOM, it is better to use interactiveReportRegion#getSelectedValues
See also interactiveReportRegion#setSelection.
Returns:
- Type
- jQuery
Example
This example get the current selection.
var selection$ = apex.region( "regionDomId" ).getSelection();
console.log( "make use of selected rows", selection$ );
Get the name of the current view. Interactive Report supports multiple views, such as:
- REPORT (Standard Report View)
- CHART (Chart View)
- DETAIL (Detail View)
- GROUP_BY (Group By View)
- ICON (Icon View)
- PIVOT (Pivot View)
Returns:
- Type
- string
Example
The following example gets the current view name.
var view = apex.region( "regionDomId" ).getViewName();
Refreshes the report with new data from the server.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pKeepPagination |
boolean |
<optional> |
Controls the pagination and scroll behavior after refresh. |
- Overrides:
Example
The following example will refresh an Interactive Report region while maintaining the same page.
apex.region( "regionDomId" ).refresh( true );
Select all the rows in the report that can be selected. Typically this applies to all currently
visible rows. Triggers the apex.event:apexselectionchange event if the selection
changes unless pNoNotify is true.
This is only applicable if the report supports multiple selection.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pFocus |
boolean |
<optional> <nullable> |
If true the first selected row is given focus. If false the first selected row is made focusable. If null or not given the current item and focus is not changed. |
pNoNotify |
boolean |
<optional> |
If true the selection change notification will be suppressed. |
Example
This example selects all the rows in the report.
apex.region( "regionDomId" ).selectAll();
Sets the last focused row to the given pRow$. If pRow$ is not a row or not in the report container the current row is not changed.
This is only applicable if the report supports selection.
The apex.event:apexcurrentrowchange event is triggered any time the current row changes.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pRow$ |
jQuery | The row to make current. | |
pFocus |
boolean |
<optional> |
If true also focus the row. |
Example
This example finds a particular row using jQuery and then makes it the current row and sets focus to it. In this example report rows have class "my-row".
var current$ = $( "#regionDomId .my-row" ).first().closest( "tr" );
apex.region( "regionDomId" ).setCurrentRow( current$, true );
Sets the last focused row to the one with the given pRowValue. If no row has the given value
the current row is not changed. The row must be rendered in order to be made the current row.
The value of a row is its primary key in the data-id attribute.
This is only applicable if the report supports selection.
The apex.event:apexcurrentrowchange event is triggered any time the current row changes.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pRowValue |
string | The value of a row. | |
pFocus |
boolean |
<optional> |
If true also focus the row. |
Selects the report rows that correspond to the given values.
The value of a row is the primary key in the data-id attribute.
The row must be rendered in order to be made a selectable row.
Triggers the apex.event:apexselectionchange event if the selection
changes unless pNoNotify is true.
This is only applicable if the report supports selection.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pValues |
Array.<string> | Array of row values to select. | |
pFocus |
boolean |
<optional> |
If true the first row of the selection is given focus. |
pNoNotify |
boolean |
<optional> |
If true the selection change event will be suppressed. |
Returns:
- Type
- number
Set the selected rows. Triggers the apex.event:apexselectionchange event if the selection
changes unless pNoNotify is true.
This is only applicable if the report supports selection.
See also interactiveReportRegion#getSelection.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pElements$ |
jQuery | A jQuery object with row elements such as the return value of getSelection. | |
pFocus |
boolean |
<optional> |
If true the first row element of the selection is given focus. |
pNoNotify |
boolean |
<optional> |
If true the selection change event will be suppressed. |
Example
This example finds a particular row using jQuery and then selects it and sets focus to it. In this example report rows have class "my-row".
var toSelect$ = $( "#regionDomId .my-row" ).first().closest( "tr" );
apex.region( "regionDomId" ).setSelection( toSelect$, true );