Closed tandraschko closed 9 months ago
It makes perfect sense to skip unrendered (and transient) components. This is also implemented as such in the orignal ResetInputAjaxActionListener
of OmniFaces.
so should we just fix both MF and Mojarra implementations - also older ones?
I fixed Mojarra https://github.com/eclipse-ee4j/mojarra/pull/5397. I noticed that the existing visit logic for execute and render already take into account SKIP_UNRENDERED (and EXECUTE_LIFECYCLE) so I decided to reuse these. I've left SKIP_TRANSIENT for what it is as it wouldn't harm -- is just kind of microoptimization in the specific case of resetValues.
As to UIViewRoot#resetValues()
API, I think we can keep it as-is for now. Best what we could do while keeping backwards compatibility is to let it take VisitHint
as varargs argument for 5.0. Then we can later improve the PartialViewContext
impl to utilize it.
also in MF now: https://github.com/apache/myfaces/commit/052a32a20b1d69ed3d035c8dd0ef49ef5388cfbb
i will create a new issue to enhance UIViewRoot#resetValues()
I found a case where
UIViewRoot#resetValues
called from#processPartialRendering
also visits unrendered components, which can lead to errors. See: https://github.com/primefaces/primefaces/issues/11408should we add
VisitHint.SKIP_UNRENDERED
when called from#processPartialRendering
?Not sure if it could break other cases