Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

ExcelExportAction is broken #371

Closed
KartnDev opened this issue Mar 9, 2021 · 3 comments
Closed

ExcelExportAction is broken #371

KartnDev opened this issue Mar 9, 2021 · 3 comments
Assignees
Labels
state: won't fix This will not be worked on type: bug Something isn't working
Milestone

Comments

@KartnDev
Copy link
Contributor

KartnDev commented Mar 9, 2021

  • Create new Jmix project
  • add dependency to jmix-ui-export (implementation 'io.jmix.ui:jmix-ui-export')
  • create any BrowseScreen
  • go to xml declaration and peek GroupTable's actions
  • add here <action id="anyName" type="excelExport">
  • open this screen :
  • here is IllegalArgumentException: Unable to find action type: excelExport
    Снимок экрана (10)
@KartnDev KartnDev added the type: bug Something isn't working label Mar 9, 2021
@KartnDev
Copy link
Contributor Author

KartnDev commented Mar 9, 2021

I did hardcore version link ExcelExportAction to the button instead of xml <action id="anyName" type="excelExport">
and i got NPE in getIcon method caused by Icons icons component was null (not injected by @Autowired)
So if facade and override it with @Override public String getIcon() {return "";} action will work

@Flaurite
Copy link
Contributor

The problem occurs due to io.jmix.ui:jmix-ui-export dependency.

I think, io.jmix.ui:jmix-ui-export usage is not recommended, because Auto Configuration may have conditional beans and you should manually add UiExportConfiguration to the app configuration like this:

@SpringBootApplication
@Import(UiExportConfiguration.class)
public class DemoAppApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoAppApplication.class, args);
    }
}

For ui-export module we have io.jmix.ui:jmix-ui-export-starter that will add UiExportConfiguration to the app context.

@glebfox glebfox added the state: won't fix This will not be worked on label Mar 10, 2021
@Flaurite
Copy link
Contributor

Flaurite commented Mar 10, 2021

@KartonDCP regard to NPE in ExcelExportAction, any action must be created by io.jmix.ui.Actions bean, because we consider that action is a Spring Bean.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
state: won't fix This will not be worked on type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants