... | ... | @@ -23,7 +23,8 @@ Base Panel: |
|
|
* [How to hook up before save on an entity form](#how-to-hook-up-before-save-on-an-entity-form)
|
|
|
* [How to remove document field button from toolbar](#how-to-remove-document-field-button-from-toolbar)
|
|
|
* [How to control actions availability](#how-to-control-actions-availability)
|
|
|
* [How to dymanically add UBDetailGrid to a form](#how-to-dymanically-add-ubdetailgrid-to-a-form)
|
|
|
* [How to dynamically add UBDetailGrid to a form](#how-to-dynamically-add-ubdetailgrid-to-a-form)
|
|
|
* [How to hook initComponent](#how-to-hook-initcomponent)
|
|
|
|
|
|
Custom Forms and Controls:
|
|
|
* [My custom form does not work](#my-custom-form-does-not-work)
|
... | ... | @@ -467,7 +468,7 @@ tbar.insert(tbar.items.length - 1, info); |
|
|
```
|
|
|
The same in grid is done in method `setupActions`.
|
|
|
|
|
|
## How to dymanically add UBDetailGrid to a form
|
|
|
## How to dynamically add UBDetailGrid to a form
|
|
|
|
|
|
When a detail grid is added to a form dynamically, i.e. after form created an initialized, the detail component will display grid, but it will not be attached to a master record.
|
|
|
In order to "connect" it to the master record, use the following code snippet:
|
... | ... | @@ -480,6 +481,11 @@ Beware that `getDetails` and `setDetails` are not getter and setter methods, the |
|
|
* `getDetails` scans the form recursively and searches for all the details. The `details` attribute stores the list - so, need to assign result returned by `getDetails` to it.
|
|
|
* `setDetails` is actually the method, which 'establishes' the link between master and detail.
|
|
|
|
|
|
## How to hook initComponent
|
|
|
|
|
|
Auto forms do not allow override `initComponent` - it will just not work.
|
|
|
But it is possible to define `initComponentStart` and do there manipulations with `items` collection, for example. Call of `callParent` is not required.
|
|
|
Data would not be ready by that moment, but `commandConfig` will be there.
|
|
|
|
|
|
# Custom Forms and controls
|
|
|
|
... | ... | |