Highlighting table rows in error

Hi, I have a Price List editor screen with a table of Prices. I’m using the postValidate method to raise descriptive alerts when the dates from different Prices overlap.

I’m wondering if the framework supports highlighting table rows that have errors? The solution I’m considering is adding an attribute to the Price entity hasError and having the postValidate method set this to true. Or do you suggest a different approach to the challenge?

Will this work for you?
https://demo.cuba-platform.com/sampler/open?screen=style-table

Thank you. This works for highlighting. The only concern I have is that the Customer entity requires a Grade attribute for the solution to work. In my case, I want to highlight rows in error and only save the rows when there are no errors present. A row where hasError=true would never be saved to the database so it seems wasteful to create an attribute/column for it.

But I think I can keep a list UUIDs of entities in error off to the side and use a custom icon provider on the table…

Hello,

Unfortunately, we have not good API for the Table validation. I’ve created an issue to fix it: YouTrack. Hope it will be fixed soon.

Best regards,
Daniil.

1 Like