Extending UI addon of another addon

Hi all,

I have setup a compiste project,

  • the starter that have no screen and entities
  • an oidc addon that contains User entity, and user screen
  • an company addon that add Company Entity + screens

This last addon extend User entity by adding a manyToOne relation with company . It works fine, I can show the database change.
But I try to extend UI for User screens like you explain in the documentation, but when I try to access this new interface I just see the original User interface with no addition…
Someone can help me ?

CmpUser

@JmixEntity
@Entity
@ReplaceEntity(User.class)
public class CmpUser extends User {
    @OnDeleteInverse(DeletePolicy.UNLINK)
    @JoinColumn(name = "COMPANY_ID")
    @ManyToOne(fetch = FetchType.LAZY)
    private Company company;

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }
}

cmp-user-brownse.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://jmix.io/schema/ui/window"
        caption="msg://fr.utbm.crunch.oidc.screen.user/UserBrowse.caption"
        extends="fr/utbm/crunch/oidc/screen/user/user-browse.xml">
    <data>
        <collection id="usersDc"
                    class="fr.utbm.crunch.company.entity.CmpUser">
            <fetchPlan extends="_base">
                <property name="company" fetch="AUTO"/>
            </fetchPlan>
        </collection>
    </data>
    <layout>
        <groupTable id="usersTable">
            <columns>
                <column id="company"/>
            </columns>
        </groupTable>

    </layout>
</window>

CmpUserBrowse.java

@UiController("User.browse")
@UiDescriptor("cmp-user-browse.xml")
public class CmpUserBrowse extends UserBrowse {
}

Best regards

Alexandre

Hi,

Which Jmix version do you use? I’ve just tried to reproduce your case with Jmix 1.5.2 and everything seems to work fine.

Here is my project: composite-user-inheritance.zip (1.3 MB)

If you still have problems with this, then please try to reproduce your case in a new small composite project and attach it here.

Hi Maxim, thanks for your answer,

I try your project and it works fine. But mine will not working. I used Jmix 1.5.2. I will make a small composite project.

Best regards
Alexandre