|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Nested ui:repeat, serious and dangerous bug.Hi all,
I've stumbled on a very dangerous bug that changes the data of a form without the knowledge of the user. The bug is when you nest ui:repeat and you have input components inside. If you make an action that leaves you on the same page and the data changes (like seeing the same data, but from a different angle), the value of the datamodel and the value of the components become unsynchronized, so the next submit will overwrite the original data. This bug was reported in May (https://facelets.dev.java.net/issues/show_bug.cgi?id=349) but I think the description doesn't stress the urgency of this bug that silently corrupts user data. I've made a simple page (plus backend) that shows the bug in action that I've attached to the bug. I've looked around and made some experiments, and found that maybe the source of the problem is within saveChildState() and restoreChildState(). They're only called within setIndex(..), and if I remove those calls, the data doesn't corrupt (however the form submit stops working properly). I'm still trying to find out how to fix this, but I could really use some suggestions. Thanks! *Disclaimer:* Deloitte refers to one or more of Deloitte Touche Tohmatsu, a Swiss Verein, its member firms, and their respective subsidiaries and affiliates. As a Swiss Verein (association), neither Deloitte Touche Tohmatsu nor any of its member firms has any liability for each other's acts or omissions. Each of the member firms is a separate and independent legal entity operating under the names "Deloitte," "Deloitte & Touche," "Deloitte Touche Tohmatsu," or other related names. Services are provided by the member firms or their subsidiaries or affiliates and not by the Deloitte Touche Tohmatsu Verein. Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Nested ui:repeat, serious and dangerous bug.I've uploaded a proposed fix for this bug.
The ui:repeat component has an internal child state map that needs to be cleaned on the beginning of the render phase. Can someone have a look at it? Thanks, José ________________________________________ From: Freire, Jose Luis (PT - Lisbon) [jfreire@...] Sent: 29 June 2009 22:42 To: users@... Subject: Nested ui:repeat, serious and dangerous bug. Hi all, I've stumbled on a very dangerous bug that changes the data of a form without the knowledge of the user. The bug is when you nest ui:repeat and you have input components inside. If you make an action that leaves you on the same page and the data changes (like seeing the same data, but from a different angle), the value of the datamodel and the value of the components become unsynchronized, so the next submit will overwrite the original data. This bug was reported in May (https://facelets.dev.java.net/issues/show_bug.cgi?id=349) but I think the description doesn't stress the urgency of this bug that silently corrupts user data. I've made a simple page (plus backend) that shows the bug in action that I've attached to the bug. I've looked around and made some experiments, and found that maybe the source of the problem is within saveChildState() and restoreChildState(). They're only called within setIndex(..), and if I remove those calls, the data doesn't corrupt (however the form submit stops working properly). I'm still trying to find out how to fix this, but I could really use some suggestions. Thanks! *Disclaimer:* Deloitte refers to one or more of Deloitte Touche Tohmatsu, a Swiss Verein, its member firms, and their respective subsidiaries and affiliates. As a Swiss Verein (association), neither Deloitte Touche Tohmatsu nor any of its member firms has any liability for each other's acts or omissions. Each of the member firms is a separate and independent legal entity operating under the names "Deloitte," "Deloitte & Touche," "Deloitte Touche Tohmatsu," or other related names. Services are provided by the member firms or their subsidiaries or affiliates and not by the Deloitte Touche Tohmatsu Verein. Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |