This is a showcase CUBA application that demonstrates how to add pictures to system users.
- The
UserExtentity extends theUserentity defined in the platform. We have added theimageattribute which is a reference to theFileDescriptorentity. So user avatars will be stored inFileStorage. - The
Taskentity is a sample domain entity which has the link to a user. - The
user-browse.xmlscreen extends the browser screen defined in the platform. We have added theimagecolumn which displays the user picture by means of theEmbeddedcomponent created in theUserExtBrowsercontroller class. - The
user-edit.xmlextended editor screen defines the components for uploading and displaying a user picture. - The
task-browse.xmlscreen displays linked users with pictures. See theTaskBrowsecontroller 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 asadmin/admin - 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.10.1
Please use https://www.cuba-platform.com/discuss for discussion, support, and reporting problems coressponding to this sample.