3.10.3. Entity Inspector
The entity inspector enables working with any application objects without having to create dedicated screens. The inspector dynamically generates the screens to browse and edit the instances of the selected entity.
This gives the system administrator an opportunity to review and edit the data that is not accessible from standard screens due to their design, and to create the data model and main menu sections linked to the entity inspector only, at prototyping stage.
The entry point for the inspector is the
String-type parameter named
entity with an entity name has been passed to the screen, the inspector will show a list of entities with the abilities for filtering, selection and editing. The parameter can be specified when registering the screen in screens.xml, for example:
<screen id="sales$Product.lookup" template="/com/haulmont/cuba/gui/app/core/entityinspector/entity-inspector-browse.xml"> <param name="entity" value="sales$Product"/> </screen>
Generally, the screen may be called without any parameters. In this case, the top part will contain an entity selection field. In the cuba application component, the inspector screen is registered with the
entityInspector.browse identifier, so it can be simply referenced in a menu item: