Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sheet: Data Exporter support #1156

Open
anatoliaDev opened this issue Apr 17, 2023 · 3 comments
Open

Sheet: Data Exporter support #1156

anatoliaDev opened this issue Apr 17, 2023 · 3 comments
Assignees
Labels
enhancement Improve an existing component

Comments

@anatoliaDev
Copy link

anatoliaDev commented Apr 17, 2023

Describe the feature you would like to see added

I would like to use data export for sheet like how primefaces datatable support. Currently there is no component to export data for sheet table.

Additional context

https://stackoverflow.com/questions/76032572/data-exporter-for-primefaces-extensions-sheet

@anatoliaDev anatoliaDev added the enhancement Improve an existing component label Apr 17, 2023
@melloware
Copy link
Member

I think this is a good suggestion. Let me investigate this.

@melloware melloware self-assigned this Apr 17, 2023
@melloware
Copy link
Member

melloware commented Apr 17, 2023

This will be tougher than I thought as the Exporter component was not expecting exporters defined outside of PF. See
https://github.com/primefaces/primefaces/blob/1bd89e0ca90398e642b57978990efd753bd4adbf/primefaces/src/main/java/org/primefaces/component/export/DataExporter.java#L185-L197

Right now its expecting the types to be declared there.

    protected Class<? extends UIComponent> guessTargetClass(List<UIComponent> targets) {
        Class<? extends UIComponent> targetClass = null;
        if (targets != null) {
            for (UIComponent current : targets) {
                if (current instanceof DataTable) {
                    targetClass = DataTable.class;
                }
                else if (current instanceof TreeTable) {
                    targetClass = TreeTable.class;
                }
            }
        }
        return targetClass;
    }

@melloware melloware changed the title Data Exporter for PrimeFaces Extensions Sheet Sheet: Data Exporter support Apr 17, 2023
@melloware melloware added this to the 13.0.0 milestone Jun 28, 2023
@melloware
Copy link
Member

I think this can be fixed now with the latest changes in core PF allowing more pluggable exporters

@melloware melloware removed this from the 13.0.0 milestone Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve an existing component
Projects
None yet
Development

No branches or pull requests

2 participants