tamaki.mes.utils.openEmbeddedSidebar
Description
Opens the right-side dock (embedded-sidebar-right) showing the Sidebar/EmbeddedSideBar view, which
embeds the view at path with the supplied params. The dock's width is set by size. The function
sets popupType to 'right-sidebar' in the params and briefly pauses before opening the dock so the
dock content can be configured first.
Must be run in a Perspective session scope.
Syntax
tamaki.mes.utils.openEmbeddedSidebar(path, params, size=800)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
path | String | False | The path to the view to embed in the sidebar. |
params | Dict | False | The parameters to pass to the embedded view. |
size | Integer | True | The width (or height) of the dock. Defaults to 800. |
Returns
This method does not return a value. It opens the right-side dock as a side effect.
Code Examples
# From a table's onRowClick / button event: open the edit form in the right sidebar
selectedRows = self.view.custom.selectedRows
if selectedRows is None:
return
selectedRow = selectedRows[0]
locationId = self.view.params.locationId
inventoryOperationId = selectedRow['id']
tamaki.mes.utils.openEmbeddedSidebar(
'TamakiMES/Inventory/InventoryOperation/_popups/CreateInventoryOperation',
{'locationId': locationId, 'inventoryOperationId': inventoryOperationId}
)