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

DataTable: Method is called multiple times inside of p:columns #11799

Closed
BryanV91 opened this issue Apr 23, 2024 · 11 comments · Fixed by #11800
Closed

DataTable: Method is called multiple times inside of p:columns #11799

BryanV91 opened this issue Apr 23, 2024 · 11 comments · Fixed by #11800
Assignees
Labels
🐞 defect Bug...Something isn't working
Milestone

Comments

@BryanV91
Copy link

BryanV91 commented Apr 23, 2024

Describe the bug

When I click any button inside of p:columns, method is called multiple times.

Reproducer

  1. Go to test.xhtml
  2. Click on any button (for OmniFaces download, make sure to change the path to any local file in your computer in this function Faces.sendFile(new File("change me"), false);)
  3. See console

primefaces-test-jakarta.zip

Expected behavior

All actions should be called once.

PrimeFaces edition

Community

PrimeFaces version

13.0.8 Jakarta

Theme

No response

JSF implementation

Mojarra

JSF version

4.0.7

Java version

17

Browser(s)

All browsers

@BryanV91 BryanV91 added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Apr 23, 2024
@BryanV91
Copy link
Author

Feedback here:

omnifaces/omnifaces#801

@Rapster
Copy link
Member

Rapster commented Apr 23, 2024

Did you try with 14 RC3 ?

@Rapster
Copy link
Member

Rapster commented Apr 23, 2024

I have a feeling it's because of this #11685 :(

@BryanV91
Copy link
Author

I will report back in a few hours with PF14.

@Rapster
Copy link
Member

Rapster commented Apr 23, 2024

same bug in PF 14

@Rapster
Copy link
Member

Rapster commented Apr 23, 2024

@melloware we might have to revert fix #11686... The workaround (and the right way is to not use dynamic rendered with columns)

@melloware
Copy link
Member

@BryanV91 does this work on PF 13.0.6. Just seeing if this fix is the issue or whether it's always been broken?

Rapster added a commit to Rapster/primefaces that referenced this issue Apr 23, 2024
@BryanV91
Copy link
Author

If I remember correctly it will work if I don't use conditional rendering (just rendered=true or filtering the cols to be shown in the backing bean).

@Rapster
Copy link
Member

Rapster commented Apr 23, 2024

I provided a fix, so let's see

@Rapster Rapster removed the ‼️ needs-triage Issue needs triaging label Apr 23, 2024
@melloware melloware added this to the 13.0.9 milestone Apr 23, 2024
@Rapster Rapster modified the milestones: 13.0.9, 14.0.0 Apr 23, 2024
@Rapster
Copy link
Member

Rapster commented Apr 23, 2024

Looks good (to be merged in master and 13.0.x) I'll update the IT ASAP

@melloware
Copy link
Member

I will backport to 13.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 defect Bug...Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants