Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

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

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

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

Syntax

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


Code Examples
Code Snippet
# 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")
Code Snippet
# This code would swap from window named WindowA to a window named WindowB
system.nav.swapWindow("WindowA", "WindowB")
Code Snippet
# 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})
  • No labels