Skip to content

Latest commit

 

History

History
27 lines (14 loc) · 1.64 KB

README.md

File metadata and controls

27 lines (14 loc) · 1.64 KB

ext-user

This example shows how to extend system CUBA entities, taking User entity as an example.

Extending System Entity

ExtUser entity extends and replaces User entity by adding two fields:

  • address of type String
  • department, which is associated to the Department entity, declared in the project

Extending System View

In order to reflect changes in the User Editor screen we need to create a new view, which extends the system user.edit view. In order to override the old system view, the extending view has the same name as its ancestor.

Extending System Sreen

In order to show fields we extend the standard User Screen, coming with the CUBA Platform, and register it in the web-screens.xml file.

Using Extended Attributes

The sample aslo shows how the extended User entity can be used. In the Request Edit screen there are two fields, that should be populated by default (Request#user and Request#department) from the currently logged-in user.

All the steps can be completed fast and easy, using the power of the CUBA Studio, which will scaffold classes, views and screens for you.

P.S. Find another way of extending the system user entity in this sample.