-
Notifications
You must be signed in to change notification settings - Fork 111
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
Vanish input data after triggering an immediate command #5073
Comments
+1 2.3.17 breaks my application. The state of all form fields is lost when validation fails. 2.3.16 still works perfectly. |
Reproduced. This is the smallest possible reproducer:
Norepro. Probably you also had an immediate command and it's not related to validation failures. Else post a boiled down reproducer. It's really bad that this has slipped through the integration tests. Historically they also ran with PSS turned off but this is since Jakarta migration not anymore happening. That said, the immediate attribute has since JSF 2.0 lost its real value because the originally intended functionality can be achieved in a much more robust way using <f:ajax> or <h:button>. The immediate attribute should preferably NOT be used in JSF 2.0+ applications. See also https://stackoverflow.com/questions/13071512/why-was-immediate-attribute-added-to-the-editablevalueholders Nonetheless this bug indeed really warrants analysis and fixing. |
Regression of performance optimizations done in #4808. It was in hindsight not compatible with Full State Saving. It was not immediately obvious how to get it to work with FSS anyway, so I've for now simply restored the original implementation and added an if/else on PSS/FSS and let the FSS condition run the original implementation. Noted should be that there were and are plans to deprecate and remove FSS in a future Faces version simply because PSS is far superior over it. |
Indeed, FSS will be deprecated in Faces 4 for removal. (small historical note, it should never have been included in the first place, and during the initial JSF design plans it was already controversial to fully save the state) |
Many thanks for your feedback. I'll try to dive deeper into the issue. I was thinking that it could also be related to #5065 (typo edited). Is there a SNAPSHOT or NIGHTLY repo for the 2.3 branch? |
We haven't discussed it yet afaik, but maybe we should consider deprecating the immediate attribute as well? |
Definitely in favor of this. |
impl/src/main/java/com/sun/faces/facelets/tag/jsf/ComponentSupport.java
impl/src/main/java/com/sun/faces/facelets/tag/jsf/ComponentSupport.java
Upmerged into 3.x and 4.x branches.
Frankly I'm not sure where it is. It was previously automated externally via Hudson. @arjantijms how exactly is this currently configured? |
Hello there We are currently experiencing some problems with Mojarra 2.3.17 which might be related to this issue and #5065. We are migrating an app with JSF and PrimeFaces 8 to WildFly 26.0.1.
We dug deep into this and found out, that the problem is related to the changes of the ComponentStateHelper.put(Serializable key, String mapKey, Object value) method made with #4808. We found out that the reason for ComponentSupport.findChildByTagId(...) to not find the previously created and populated AutoComplete component lies in the method ComponentStateHelper.put(Serializable key, String mapKey, Object value). In this method an attempt to update the DescendantMarkIdCache is made. So we moved the code to update the DescendantMarkIdCache to the end of the put-method Enclosed you will find the patch of the change we've made. |
Fix has been released in Mojarra 2.3.18 / 3.0.2 / 4.0.0 |
Describe the bug
With JSF 2.3.17 an immediate command let vanish all input data of a "form" which has no bindings. This happened only with: PARTIAL_STATE_SAVING == false
With JSF 2.3.15 this is not the case, all data will be displayed after triggering an immediate command.
Is this a bug or expected behavior when PARTIAL_STATE_SAVING == false?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After triggering an immediate command all input data of a "form" are still visible. The render response phase don't let the data vanish.
Screenshots
The text was updated successfully, but these errors were encountered: