Class: ChildWorkspaceContainer

XV. ChildWorkspaceContainer

The ChildWorkspaceContainer is used for handling child items within a larger workspace, e.g. QuoteLineItems within the Quote workspace. It takes a normal workspace as its workspace, but as a container acts more like a ListRelationsEditorBox. Notably, it does not save changes to the DB, because that is disallowed for child models. Rather, it just sets the models, then the user will back out of this screen into the master workspace and save everything from there.

new ChildWorkspaceContainer()

Source:

Extends

Members

published

index: the index of the model of the backing collection that's currently presented in the workspace
Source:

Methods

close()

Two changes from the default. First, do not ask the user if they want to save, because we're not saving here anyway. Second, we have to keep the spawning list relations up to date in case there has been a destroyed model, so do that now.
Source:

deleteItem()

Popup confirmation, Delete the model of the selected item and remove it from the list.
Source:

newItem()

Add a new model to the collection and bring up a blank editor to fill it in
Source:

nextItem()

Move to edit the next item in the collection.
Source:

prevItem()

Move to edit the previous line in the collection.
Source:

setWorkspace()

Loads a workspace into the workspace container. Accepts the following options: workspace: class name (required) collection: the collection that backs this child workspace container index: the index of the collection to start with (default 0) listRelations The listRelations kind that spawned this child workspace
Source:

statusChanged()

Like the super function, except that we don't try to update functions that don't exist.
Source: