Skip to content

Sample project shows how to extend native CUBA Platform entity, taking User as an example

License

Notifications You must be signed in to change notification settings

aleksey-stukalov/ext-user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Sample project shows how to extend native CUBA Platform entity, taking User as an example

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages