IllegalArgumentException: DataGrid has no API to obtain component list

Hi! I´m trying to create a DTO from a database view. I´ve made an standard DTO with jmix designer and I´m trying to test it but it doesn´t work. It gives me an error:
IllegalArgumentException: DataGrid has no API to obtain component list.
Can you help me with that?
Thanks!

1 Like

Hi!

Have you looked at the online sample of displaying entities using database view?
UI Samples :: Using database view

Regards,
Dmitriy

1 Like

I have this problem too but dont know how to fix it

Hi!

Could you please attache a demo project that reproduces the issue?

Regards,
Dmitriy

1 Like

how can i do it

You can create a new Jmix project based on the latest framework version.
Then add there the entity for which this exception occurs.
Add a similar view to the one you have in your application.

Check if an exception occurs in this case.
If an error still exists, you can export the project using a gradle task and attach it here:
image

1 Like

thank you for your support. it’s late night in my timezone now so i will give you update tomorrow

kekw.zip (122.4 KB)

Thank you, I will take a look at the project and return with the result.

1 Like

@fcbayernmunchen2000, In your case, the error occurs because you have a delegate defined in your controller for the removeAction, but this action is not defined in the XML markup of the dataGrid:

image

image

To fix everything, you need to remove the method from the controller.

There are two problems: the first is that the error message is not informative.
The error message doesn’t notice that the action was not found, but that some API was not found, this is conceptually incorrect.

Second problem: these methods are generated in any case, even if you selected other actions in the view creation wizard.
Most likely your error occurred because of this.
So, you selected the option during view creation that you only need a refreshAction, but standard generation occurred and a method to handle an undeclared removeAction was created.

All these problems are known and the corresponding tasks have been set. Our team is working to fix them:

@asantosu.ext please note, most likely you have the same error. Perhaps my suggestion can help you.

Best regards,
Dmitriy

1 Like

i can’t thank you enough for this