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

Add clearModel to f:resetValues #1940

Open
tandraschko opened this issue Jul 23, 2024 · 2 comments
Open

Add clearModel to f:resetValues #1940

tandraschko opened this issue Jul 23, 2024 · 2 comments
Labels
Milestone

Comments

@tandraschko
Copy link

in PF we have a flag called clearModel, which does not only reset the value inside the UIComponent state, it also sets the model value to null

we could easily add this to UIViewRoot#resetValues and also on f:resetValues

i would like to see it in 5.0, to get rid of it in PF

@tandraschko tandraschko added this to the 5.0 milestone Jul 23, 2024
@BalusC
Copy link
Member

BalusC commented Aug 4, 2024

Hmm makes sense.

Small issue is that f:resetValues has disappeared from spec/vdl since 2.3. I guess this was an error during 2.2->2.3 transition whereby vdl templates were reworked because during the same time the id attribute also disappeared from h:head/h:body vdl as well. So if we see need for it we should bring it back. Else just add it to f:ajax and h:commandScript, where there resetValues attribute is formally specified. Related: #1936

@tandraschko
Copy link
Author

i would clearly add f:resetValues back in the spec/vdl, otherwise there is no way to use it for non-AJAX
we didnt remove anything in MF here

and yeah, you are right; we also need it on f:ajax/h:commandScript. Maybe call it resetModelValues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants