EndModalComponent function
Syntax
EndModalComponent(ReturnValue)
Description
Use the EndModalComponent function to close a currently open secondary component. You could use this for creating your own links to exit a secondary component.
Important:
Do not use multiple EndModalComponent or EndModal invocations to close multiple, open modal secondary windows simultaneously. Each modal window must be closed individually with a single EndModalComponent call followed by an event that triggers a trip to the application server. Otherwise, multiple, simultaneous EndModalComponent or EndModal invocations will close all open modal secondary windows.
Parameters
| Parameter | Description |
|---|---|
|
ReturnValue |
A Number value that determines whether the secondary component data is saved and copied back to the parent page. A positive value saves the data in the component to the database, including all save processing and PeopleCode (this is the same as pressing the OK button). It also copies the data in the shared work record, if any, back to the primary component. A value of zero skips save processing discards buffer changes made in the secondary component (this is the same as pressing the Cancel button). |
Returns
A Boolean value: True if a non-zero value was used, False if zero was used.
Example
EndModalComponent(0); /* cancels the component without saving */
EndModalComponent(1); /* saves and closes the component */
Restrictions on Use With a Component Interface
This function can’t be used by a PeopleCode program that’s been called by a Component Interface, and is ignored.