Open tandraschko opened 4 months ago
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: https://github.com/jakartaee/faces/issues/1936
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?
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