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

SubTable: still alive even after been announced deprecated in 10.0.0 #11875

Closed
Rapster opened this issue May 4, 2024 · 8 comments · Fixed by #11913
Closed

SubTable: still alive even after been announced deprecated in 10.0.0 #11875

Rapster opened this issue May 4, 2024 · 8 comments · Fixed by #11913
Assignees
Labels
documentation Documentation needs updating
Milestone

Comments

@Rapster
Copy link
Member

Rapster commented May 4, 2024

Describe the bug

p:subTable component still appears to be alive in PF, yet, showcase has been deleted for this compnent, still there in docs, any idea what we should do about this?

PrimeFaces version

15.0.0-SNAPSHOT

@Rapster Rapster added the discussion Item needs to be discussed by core devs label May 4, 2024
@Rapster Rapster added this to the 15.0.0 milestone May 4, 2024
@melloware
Copy link
Member

melloware commented May 5, 2024

I think when we had talked before we left it in there for people still using it but we removed the showcase examples so people would stop using it. Basically it's there just for backward compatibility from what I remember. 🤷🏻‍♂️

@martin654
Copy link

Hi, we are still using it in production. I don't think that it could be replaced by other DataTable features (we use it with lazy and pagination).

@Rapster
Copy link
Member Author

Rapster commented May 6, 2024

I understand that, but also understand that so far, the way I see it, it feels we're maintening 2 features wich does the very same thing and I could be 100% wrong, but I asked in the past whoever using that feature to give us a reproducer which shows row grouping can't replace subtable and nothing...

If that turns out to be true, then we should update our docs, and our showcase. Do you think you could make a reproducer of how you're using subtable?

@martin654
Copy link

I will try to find time to create reproducer

@Rapster
Copy link
Member Author

Rapster commented May 6, 2024

Ok got it, if I understand well that coment #2269 (comment) It's useful in case of one-to-many association (non flat model) but because you "can't" change that into a flat model, you have no other choice than use subTable right?

Also, do features like sorting/filtering/exporting works on subtable?

@martin654
Copy link

martin654 commented May 6, 2024

Great that you found the old comment with the explanation. Yes, the data provided by backend are not flat, but structured with one-to-many association. We are not able to change existing backend impl just because some feature is deprecated in frontend component.

Well, good question... We use just the lazy loading and pagination feature in this case. We use filtering in this case too, but it is placed above the table in "Filtering panel", not in column headers. And the filter data are filled into service request in lazy load method.

Edit:
I think that there is a big difference when pagination used. With one-to-many association you paginate accross the master records, so for 10 items per-page you have 10 master records and all their childs on the first page.
With flat structure you would see first 10 items. It could be subset of first master record childs or you could see childs from multiple master records. It depends on the counts of childs. And its unpredictable.

Example with paginator set to 10 items per page:
Imagine a dataset in backend with 11 master items and each of them having 15 childs.
With subtable you would see first page with 10 master items and each master item would have all 15 child items displayed.
If you flatten the structure in backend and use rowgroup, you would see first 10 items from "first master".
Can you feel the difference?

@Rapster
Copy link
Member Author

Rapster commented May 12, 2024

I'm okay to undeprecate subTable, we should put the showcase pages back, remove deprecated logs etc.

@melloware
Copy link
Member

OK i will take care of that!

@melloware melloware self-assigned this May 12, 2024
@melloware melloware added enhancement Additional functionality to current component and removed discussion Item needs to be discussed by core devs labels May 12, 2024
melloware added a commit to melloware/primefaces that referenced this issue May 12, 2024
@melloware melloware added documentation Documentation needs updating and removed enhancement Additional functionality to current component labels May 12, 2024
melloware added a commit to melloware/primefaces that referenced this issue May 12, 2024
melloware added a commit to melloware/primefaces that referenced this issue May 12, 2024
melloware added a commit to melloware/primefaces that referenced this issue May 13, 2024
@melloware melloware modified the milestones: 15.0.0, 14.0.1 May 13, 2024
melloware added a commit that referenced this issue May 13, 2024
* Fix #11875: 14.0.1 Remove deprecation and restore SubTable demo

* Update SubTableView.java

* Update subtable.xhtml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation needs updating
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants