Hi all,
I have followed the documentation (Extending Functionality :: Jmix Documentation) to extend the tenant data model and its UI.
I have extended the tenant data model following the documentation. It is now called OrgRegistration.
I have also extended the tenant UI- ExtTenantBrowse and ExtTenantEdit
See below the extended UI- ExtTenantBrowse:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://jmix.io/schema/ui/window"
caption="msg://io.jmix.multitenancyui.screen.tenant/tenantBrowse.caption"
extends="io/jmix/multitenancyui/screen/tenant/tenant-browse.xml"
xmlns:ext="http://jmix.io/schema/ui/window-ext">
<data>
<collection id="orgRegistrationsDc" class="com.modula.sapb1portalmgt.entity.misc.OrgRegistration">
<fetchPlan extends="_base"/>
<loader id="orgRegistrationsDl">
<query>
<![CDATA[select e from spm_OrgRegistration e]]>
</query>
</loader>
</collection>
</data>
<layout>
<groupTable id="tenantsTable">
<columns>
<column id="firstName"/>
<column id="lastName"/>
</columns>
</groupTable>
</layout>
</window>
ExtTenantEdit:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://jmix.io/schema/ui/window" caption="msg://io.jmix.multitenancyui.screen.tenant/tenantEdit.caption"
xmlns:ext="http://jmix.io/schema/ui/window-ext"
extends="io/jmix/multitenancyui/screen/tenant/tenant-edit.xml">
<layout>
<form id="tenantForm" dataContainer="tenantDc">
<column width="350px">
<textField id="firstNameField" property="firstName" ext:index="0"/>
<textField id="lastNameField" property="lastName" ext:index="1"/>
</column>
</form>
</layout>
</window>
The problem I have with the ExtTenantBrowse is that I am getting this error:
IllegalStateException: Cannot get unfetched attribute [firstName] from detached object com.modula.sapb1portalmgt.entity.misc.OrgRegistration-a37a9746-c6db-3893-9098-049c8b1f9e51 [detached].
I am not able to retrieve firstName and lastName. These are the fields added to the extended tenant data model.
Another problem I have with ExtTenantEdit is that the firstName & lastName fields are displayed below the base entity. See below.
How can these fields be displayed immediately below the tenant name?
Thanks