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