Validte the form can be closed, and close it
The context for an Action on a form. On top of the attributes of the camelot.admin.action.application_action.ApplicationActionGuiContext, this context contains :
the QtGui.QDataWidgetMapper class that relates the form widget to the model.
a camelot.view.controls.view.AbstractView class that represents the view in which the action is triggered.
alias of FormActionModelContext
On top of the attributes of the camelot.admin.action.application_action.ApplicationActionModelContext, this context contains :
the row in the list that is currently displayed in the form
the number of objects that can be reached in the form.
the number of objects displayed in the form, at most 1.
The session to which the objects in the list belong.
The selection_count attribute allows the model_run() to quickly evaluate the size of the collection without calling the potetially time consuming method get_collection().
Parameters: | yield_per – an integer number giving a hint on how many objects should fetched from the database at the same time. |
---|---|
Returns: | a generator over the objects in the list |
Returns: | the object currently displayed in the form, None if no object |
---|
is displayed yet
Method to be compatible with a camelot.admin.action.list_action.ListActionModelContext, this allows creating a single Action to be used on a form and on list.
Parameters: | yield_per – this parameter has no effect, it’s here only for compatibility with camelot.admin.action.list_action.ListActionModelContext.get_selection() |
---|---|
Returns: | a generator that yields the current object displayed in the form and does not yield anything if no object is displayed yet in the form. |