jmix-projects / jmix-ui

DEPRECATED. Use https://github.com/jmix-framework/jmix
https://www.jmix.io
3 stars 7 forks source link

Can't generate column for table using @Install #785

Closed nekogochan closed 2 years ago

nekogochan commented 2 years ago

Trying generate id for table's coulmn corresponding to an entity attribute metapath (validationRule.name): If trying with using @Install:

@Install(to = "validationResultLogsTable.validationRule.name", subject = "columnGenerator")
private Component validationResultLogsTableValidationRuleNameColumnGenerator(ValidationResultLog validationResultLog)

get exception:

Caused by: 
  io.jmix.core.DevelopmentException: 
  Unable to find @Install target for method private io.jmix.ui.component.Component 
  validationResultLogsTableValidationRuleNameColumnGenerator(ValidationResultLog)
  in class ValidationResultLogBrowse

But if trying direct:

validationResultLogsTable.getColumn("validationRule.name")
                .setColumnGenerator(this::validationResultLogsTableValidationRuleNameColumnGenerator);

it works as excpected

looks like a bug

glebfox commented 2 years ago

The correct target is: "validationResultLogsTable.[validationRule.name]". It's Studio bug and it will be fixed in one of the upcoming bug-fix releases.