This is a showcase CUBA application that demonstrates how to add pictures to system users.
UserExtentity extends the
Userentity defined in the platform. We have added the
imageattribute which is a reference to the
FileDescriptorentity. So user avatars will be stored in
Taskentity is a sample domain entity which has the link to a user.
user-browse.xmlscreen extends the browser screen defined in the platform. We have added the
imagecolumn which displays the user picture by means of the
Embeddedcomponent created in the
user-edit.xmlextended editor screen defines the components for uploading and displaying a user picture.
task-browse.xmlscreen displays linked users with pictures. See the
TaskBrowsecontroller class for details.
To see the example in action, do the following:
- Open the project in Studio
- Click Run > Start application server
- If you see the warning Database does not exist ..., click Create DB in background
- Go to
http://localhost:8080/appand log in as
- Open Administration > Users, edit or create a user and set a picture for it.
- Open Application > Tasks, create a task and select an assignee for it from the list of users.
Based on CUBA Platform 6.3.5