The reusable component One.form.DocumentPanel has been provided which can be included in any ExtJS-based screen. This component takes the following parameters:
sysGoverningOrgId: sys id of the organization which should be used when looking up DocumentTypes
modelLevelType: model level to which the documents will be attached, used when looking up DocumenTypes
sysModelId: id of the model to which the documents are being attached
Here is an example where the DocumentType panel is added to the ModelForm JS class of a Book.