Error when clicking on abbreviated table cell

Hi everyone,

I’m new on CUBA and currently facing an issue without knowing what to do to resolve it.

The problem occurs when I’m in the Browse Screen of this entity of mine.
My setup is that I want to show the entity’s UUID, so I created a column for the ID. But as the ID is too long, I decided to use the option of maxTextLength, limiting it to 6 characters.

It looks fine until I click on the abbreviated cell and receive this error.

image

And catalina says this :

Caused by: java.lang.ClassCastException: class java.util.UUID cannot be cast to class java.lang.String (java.util.UUID and java.lang.String are in module java.base of loader 'bootstrap')
at com.haulmont.cuba.web.gui.components.table.AbbreviatedCellClickListener.onClick(AbbreviatedCellClickListener.java:56) ~[cuba-web-7.2.8.jar:7.2.8]
at com.haulmont.cuba.gui.components.compatibility.TableCellClickListenerWrapper.accept(TableCellClickListenerWrapper.java:50) ~[cuba-gui-7.2.8.jar:7.2.8]
at com.haulmont.cuba.gui.components.compatibility.TableCellClickListenerWrapper.accept(TableCellClickListenerWrapper.java:24) ~[cuba-gui-7.2.8.jar:7.2.8]
at com.haulmont.cuba.web.gui.components.WebAbstractTable.lambda$setCellClickListener$8(WebAbstractTable.java:3055) ~[cuba-web-7.2.8.jar:7.2.8]
at com.haulmont.cuba.web.widgets.CubaTable$1.onClick(CubaTable.java:112) ~[cuba-web-widgets-7.2.8.jar:na]
... 43 common frames omitted

If anyone has faced this problem before and knowing a way out of this please kindly instruct me.

Thank you in advance!
Best regards,
Tuan Ngo

P.S: Pardon me if I’m repeating a problem previously solved, in which case it’d be because of my searching skill…

Hello @tuan.23a5,

Thank you for reporting a problem. Unfortunately, the maxTextLength attribute cannot be used for a column that has a type other than a String. I have created an issue to support other datatypes.

Regards,
Gleb

1 Like

Thank you Gleb Durygin for the fast feedback.

I’ll be looking forward to the solution : )

Kind regards,
Tuan