...
In order for an entity to be available to Controlled Selection Access Mechanism, it has to meet the following conditions:
1. Data Object Class
The entity's DO class must:
- Implement ICRMDOControlledSelectableEntity interface and its two methods:
- getOrganisationalUnits()
- setOrganisationalUnits(Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits)
- Define organisationalUnits set.
...
2. Data Entry Page
a. Definition File
Data entry page definition file must include a component with a single drilldown element having tabAllowedUnits as its <tabid>. tabAllowedUnits is the tabid of the generic component that will be used in this case.
Code Block | ||||
---|---|---|---|---|
| ||||
... <main> ... <component> <id>cmpAllowedOrganisationalUnitsDrilldown</id> <name>key_allowed_organisational_units</name> <elements> <drilldown> <id>ddAllowedOrganisationalUnits</id> <tabid>tabAllowedUnits</tabid> </drilldown> </elements> </component> ... </main> ... |
b. Layout File
Data entry page layout file must include:
- The component defined in data entry definition page including the allowed organisational units drilldown element.
- The allowed organisational units tab definition in the details section, which is implemented as a generic component.
Code Block | ||||
---|---|---|---|---|
| ||||
<page> ... <sections> ... <section> <id>secAllowedProducts</id> <name>key_allowed_products</name> <disable>false</disable> <left> <components> <component><id>cmpAllowedProductsDrilldown</id></component> </components> </left> </section> ... </sections> <details> <tabs> <tab> <id>file:networkmanagement/allowedOrgUnits.xml</id> <disable>true</disable> <preload>true</preload> <showheader>false</showheader> <components> <component><id>cmpSelect</id></component> <component><id>cmpCommunity</id></component> <component><id>cmpGroup</id></component> <component><id>cmpUnit</id></component> </components> </tab> ... </tabs> </details> </page> |