system.nav.swapWindow
Performs a window swap . This means that one window is closed, and another is opened and takes its place - assuming its size, floating state, and maximization state. This gives a seamless transition - one window seems to simply turn into another.
This function works like system.nav.swapTo except that you can specify the source and destination for the swap
system.nav. swapWindow( swapFromPath, swapToPath [, params] )
-
Parameters
String swapFromPath - The path of the window to swap from. Must be a currently open window, or this will act like an openWindow.
String swapToPath - The name of the window to swap to.
PyDictionary params - A dictionary of parameters to pass into the window. The keys in the dictionary must match dynamic property names on the target window's root container. The values for each key will be used to set those properties. [optional]
-
Returns
PyObject - A reference to the swapped-to window.
-
Scope
Client
system.nav. swapWindow( event, swapToPath [, params] )
-
Parameters
EventObject event - A component event whose enclosing window will be used as the "swap-from" window.
String swapToPath - The name of the window to swap to.
PyDictionary params - A dictionary of parameters to pass into the window. The keys in the dictionary must match dynamic property names on the target window's root container. The values for each key will be used to set those properties. [optional]
-
Returns
PyObject - A reference to the swapped-to window.
-
Scope
Client
# This code would go in a button's ActionPerformed event to swap out of the
# window containing the button and into a window named MyWindow
system.nav.swapWindow(event,
"MyWindow"
)
# This code would swap from window named WindowA to a window named WindowB
system.nav.swapWindow(
"WindowA"
,
"WindowB"
)
# This code would swap from window named WindowA to a window named WindowB.
# It also looks at the two calendar popup controls and passes the two selected
# dates to WindowB. WindowB's Root Container must have dynamic properties named
# "startDate" and "endDate"
date1
=
event.source.parent.getComponent(
"Start Date"
).date
date2
=
event.source.parent.getComponent(
"End Date"
).date
system.nav.swapWindow(
"WindowA"
,
"WindowB"
, {
"startDate"
:date1,
"endDate"
:date2})