How to customize dynamic attributes in form

I want to customize dynamic attributes on my forms.
How to get components which belongs to dynamic attributes and put them another place of my layout.
Can you advice me how to do this.
I’m using 7.1 version of cuba.


The advantage of dynamic attributes is that managing them does not require changing application code.
On the Form and Table elements, they can be displayed automatically.
There is no way to add them directly to the screen descriptor markup.
They may not be available at the time of writing, and may be added to use.
You can display dynamic attributes on the screen using the Administration / Dynamic Attributes screen.
This is described in the documentation. Version 7.1 and 7.2 do not have significant changes.

Of course, you can place elements in the markup without data binding, and then fill in the screen elements from dynamic attributes in the screen controller. But this reduces their flexibility.

Hi @nurmuhammad.abdurashidov,

I think that @andreyvb mentioned DynamicAttributesPanel.

There is the possibility to customize as you said too. Take a look at the Managing Dynamic Attributes - Visibility of attributes.

Dynamic attributes can be added to a screen manually. In order to do this, add dynamicAttributes="true" attribute to the data loader and use attribute’s code with + prefix when binding UI components to it:

Hope it helps.


1 Like

Thanks for your response Andrey,
Got what you mean.
so, how can i programmatically get some dynamic attribute components and put them another layout.
I’m getting dynamic attributes like this.

<column width="250px">
<field property="+CandidateMain_Document"/>
<field property="+CandidateDetails_LinkTelegram"/>

But in future, i don’t know my user adds how many fields to the entity.
That’s why, i should separate dynamic attributes to 2 parts, and put them their predefined layouts in future. For example: components which starts with ‘Main_ ***’ shout locate in first layout, components which starts with ‘Details_ ***’ shout locate in second layout.


You can handle dynamic attributes like this and place them on the screen as you like:

Map<String, CategoryAttributeValue> dynamicAttributes  = newEntityDc.getItem().getDynamicAttributes();
            if (dynamicAttributes != null) {
                dynamicAttributes.forEach((key, value) -> {
                    Label<String> label = uiComponents.create(Label.TYPE_STRING);
                    if (key.startsWith("myCategoryright")) {
                    if (key.startsWith("myCategoryleft")) {

This is just an illustration for string attributes. It does not take into account possible types of dynamic attributes and other points.But the structure is quite transparent and you can implement what you need.
I attach a test project for experiments. (84.4 KB)


You can create several forms in your screen and specify them in the Dynamic Attribute Editor, in the Component ID column at the Visibility tab.
The only thing - you should create these forms in advance, ta development time and know their IDs.

See in documentation:

In addition to the screen, you can also specify a component in which the attribute should appear (for example, for screens where several Form components show the fields of the same entity).