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

ColorPicker: Submitted value set to converted value. #10609

Closed
jankosd opened this issue Sep 7, 2023 · 2 comments · Fixed by #10612
Closed

ColorPicker: Submitted value set to converted value. #10609

jankosd opened this issue Sep 7, 2023 · 2 comments · Fixed by #10612
Assignees
Labels
⚡ performance Performance related issue or enhancement
Milestone

Comments

@jankosd
Copy link

jankosd commented Sep 7, 2023

Describe the bug

ColorPickerRenderer.decode() sets submitted value to converted value:
colorPicker.setSubmittedValue(ComponentUtils.getConvertedValue(context, component, submittedValue))

This causes problems when using a converter: getAsObject() is called twice, first time with correct (submitted) value and second time with already converted value.

Obviously, converter can be made to work around this, but I doubt this is expected behaviour.

Reproducer

https://github.com/primefaces/primefaces/files/12552676/pf-10609.zip

Expected behavior

No response

PrimeFaces edition

Community

PrimeFaces version

13.0.0

Theme

No response

JSF implementation

Mojarra

JSF version

4.0.3

Java version

17

Browser(s)

No response

@jankosd jankosd added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Sep 7, 2023
@melloware
Copy link
Member

Weird the code has been doing this for years I just checked the commit history. According to the git log it was fixed in #2446

So there must have been an issue?

@melloware melloware changed the title p:colorPicker: Submitted value set to converted value. ColorPicker: Submitted value set to converted value. Sep 7, 2023
@melloware melloware removed the ‼️ needs-triage Issue needs triaging label Sep 7, 2023
@melloware melloware self-assigned this Sep 7, 2023
@melloware melloware added this to the 14.0.0 milestone Sep 7, 2023
@melloware
Copy link
Member

I have confirmed this with this reproducer:
pf-10609.zip

@melloware melloware modified the milestones: 14.0.0, 13.0.1 Sep 8, 2023
@melloware melloware added ⚡ performance Performance related issue or enhancement and removed 🐞 defect Bug...Something isn't working labels Sep 8, 2023
melloware added a commit to melloware/primefaces that referenced this issue Sep 8, 2023
melloware added a commit to melloware/primefaces that referenced this issue Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ performance Performance related issue or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants