Dynamic Attributes Panel

Hi
I was able to add dynamic attributes to the session/speaker example from you quick start section (CUBA Studio Quick Start – CUBA Platform) which works great. However, in this example the new attributes were just appended at the end of the form

I try to fully understand the topic “DynamicAttributesPanel” and the usage of columns and rows. A small example on github which illustrates the usage of the DynamicAttributesPanel, rows and columns would be extremely useful. The objective for me is to know, how I have to design our new interface in a way that an administrator can add attributes at runtime and that the UI still looks nice for the end user.

Best
Wern

Hello, Wern.

Please, see about the Attributes Location tab
Maybe it will be suitable for your purposes?

Best regards,
Mariya

Hi Mariya

My example looks as follows (which works so far):


However, I think the column definition has no effect in this example. Mybe a column specification makes no sense in this example. I would like to know how to use the column/row feature where I can place the attributes at a difference place in the screen.

What am I also looking for is an example which envisions the usage of dynamic attributes as described here: DynamicAttributesPanel - CUBA Platform. Developer’s Manual. I would highly appreciate having an example which could be downloaded.

Best
Wern

Hello, Wern.

The Speaker entity does not implement com.haulmont.cuba.core.entity.Categorized interface, so you can not use DynamicAttributesPanel component for displaying dynamic attributes of this entity.
You should implement com.haulmont.cuba.core.entity.Categorized interface for your entity, do steps from the DynamicAttributesPanel - CUBA Platform. Developer’s Manual section, so you can set the location of each dynamic attribute on the Attributes Location tab or use the col/row attributes on the DynamicAttributesPanel

See the example project: session-planner.zip (88.9 KB)

Best regards,
Mariya

Thanks!
Wern