Hello, I sent the below email out twice. I was
wondering if anyone had any ideas. Is my email clear enough? Thanks again, Mike -------- I’ve run into a situation where an
‘xforms:delete’ is being recognized as a
‘xforms-value-changed’ event in a repeat. This is then
causing an ‘xforms:setvalue’ action to occur. I believe this
is a bug (when I
perform a similar task in FireFox it works fine). I’ve attached the code and here is the link to the
code (for the sandbox): http://dl.lib.brown.edu/mwp/xforms/genre.xhtml.
You will see I’ve placed a message in the xforms-value-changed to show
that the delete is causing a change. *NOTE: the delete problem occurs at an inner position().
So add 3 or more and delete position 2. In other words, it never
happens for the last or first node. Thanks, Mike -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws genre.xhtml (8K) Download Attachment |
Administrator
|
Mike,
There is a simple explanation for this. What you would expect, of course is that you delete the middle node, which should translate into deleting the middle row of controls. Since the value of the controls doesn't change from the user perspective, no event should be fired. However, what actually happens is that Orbeon Forms compares the initial (3 rows) and final (2 rows) of controls. In this case, the first row of controls is still bound to the same nodes in the instance, however the second row of controls is bound to different nodes. In order to make sure that event handlers are called, Orbeon Forms then dispatches xforms-value-changed for the controls on that row. The third row is gone so no events are sent. Of course, this is not particularly good ;-) However, This is a problem which we are discussing in the Forms Working Group at W3C: UI events, including xforms-value-changed, are not reliable, meaning that such events: 1. May be sent out redundantly 2. May not be sent when when should be Orbeon Forms attempts to address #2, but not #1 at the moment. This means that you cannot rely on xforms-value-changed being sent out "if and only if" the value of a control has changed. I entered the following bug to track this: http://forge.objectweb.org/tracker/index.php?func=detail&aid=308076&group_id=168&atid=350207 Do you have a way of working around this behavior? -Erik On Dec 18, 2007, at 9:53 AM, Park, Michael wrote: > Hello, > > I sent the below email out twice. I was wondering if anyone had any > ideas. Is my email clear enough? > > Thanks again, > Mike > > > -------- > > I’ve run into a situation where an ‘xforms:delete’ is being > recognized as a ‘xforms-value-changed’ event in a repeat. This is > then causing an ‘xforms:setvalue’ action to occur. I believe this > is a bug (when I perform a similar task in FireFox it works fine). > > I’ve attached the code and here is the link to the code (for the > sandbox): http://dl.lib.brown.edu/mwp/xforms/genre.xhtml. You will > see I’ve placed a message in the xforms-value-changed to show that > the delete is causing a change. > > *NOTE: the delete problem occurs at an inner position(). So add 3 > or more and delete position 2. In other words, it never happens for > the last or first node. > > Thanks, > Mike > <genre.xhtml> > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Thx Eric,
That's too bad... Actually, I've spent quite a bit of time trying work-arounds with no luck. I just fix one thing and get another issue instead. -Mike -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Tuesday, December 18, 2007 3:31 PM To: [hidden email] Subject: Re: [ops-users] xforms-value-changed bug ? Mike, There is a simple explanation for this. What you would expect, of course is that you delete the middle node, which should translate into deleting the middle row of controls. Since the value of the controls doesn't change from the user perspective, no event should be fired. However, what actually happens is that Orbeon Forms compares the initial (3 rows) and final (2 rows) of controls. In this case, the first row of controls is still bound to the same nodes in the instance, however the second row of controls is bound to different nodes. In order to make sure that event handlers are called, Orbeon Forms then dispatches xforms-value-changed for the controls on that row. The third row is gone so no events are sent. Of course, this is not particularly good ;-) However, This is a problem which we are discussing in the Forms Working Group at W3C: UI events, including xforms-value-changed, are not reliable, meaning that such events: 1. May be sent out redundantly 2. May not be sent when when should be Orbeon Forms attempts to address #2, but not #1 at the moment. This means that you cannot rely on xforms-value-changed being sent out "if and only if" the value of a control has changed. I entered the following bug to track this: http://forge.objectweb.org/tracker/index.php?func=detail&aid=308076&grou p_id=168&atid=350207 Do you have a way of working around this behavior? -Erik On Dec 18, 2007, at 9:53 AM, Park, Michael wrote: > Hello, > > I sent the below email out twice. I was wondering if anyone had any > ideas. Is my email clear enough? > > Thanks again, > Mike > > > -------- > > I've run into a situation where an 'xforms:delete' is being > recognized as a 'xforms-value-changed' event in a repeat. This is > then causing an 'xforms:setvalue' action to occur. I believe this > is a bug (when I perform a similar task in FireFox it works fine). > > I've attached the code and here is the link to the code (for the > sandbox): http://dl.lib.brown.edu/mwp/xforms/genre.xhtml. You will > see I've placed a message in the xforms-value-changed to show that > the delete is causing a change. > > *NOTE: the delete problem occurs at an inner position(). So add 3 > or more and delete position 2. In other words, it never happens for > the last or first node. > > Thanks, > Mike > <genre.xhtml> > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Sorry about that Mike, but UI events are tricky. I suspect this is an
issue in most implementations. We have been fighting quite a bit in the Forms Working Group at W3C to tackle this issue. We hope to fix it in Orbeon Forms before that, but since the fix is quite involved, for now we have to resort to workarounds whenever possible. In this case, I am not too sure if there is an easy workaround just in the XForms. One way of fixing this in the code would be in XFormsControls.findSpecialRelevanceChanges(). Here what we do is compare two versions of repeated controls, and we know whether the repetition of controls has grown or shrunk. What we don't know is why, e.g. if this is the result of xforms:insert, xforms:delete, and instance replacement, or a combination of the above. But from this information, we could possibly infer that a row has disappeared. If you have Java skills, feel free to looks at this and help! -Erik On Dec 18, 2007, at 1:57 PM, Park, Michael wrote: > Thx Eric, > > That's too bad... Actually, I've spent quite a bit of time trying > work-arounds with no luck. I just fix one thing and get another issue > instead. > > -Mike > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > Bruchez > Sent: Tuesday, December 18, 2007 3:31 PM > To: [hidden email] > Subject: Re: [ops-users] xforms-value-changed bug ? > > Mike, > > There is a simple explanation for this. What you would expect, of > course is that you delete the middle node, which should translate into > deleting the middle row of controls. Since the value of the controls > doesn't change from the user perspective, no event should be fired. > > However, what actually happens is that Orbeon Forms compares the > initial (3 rows) and final (2 rows) of controls. In this case, the > first row of controls is still bound to the same nodes in the > instance, however the second row of controls is bound to different > nodes. In order to make sure that event handlers are called, Orbeon > Forms then dispatches xforms-value-changed for the controls on that > row. The third row is gone so no events are sent. > > Of course, this is not particularly good ;-) > > However, This is a problem which we are discussing in the Forms > Working Group at W3C: UI events, including xforms-value-changed, are > not reliable, meaning that such events: > > 1. May be sent out redundantly > 2. May not be sent when when should be > > Orbeon Forms attempts to address #2, but not #1 at the moment. This > means that you cannot rely on xforms-value-changed being sent out "if > and only if" the value of a control has changed. > > I entered the following bug to track this: > > http://forge.objectweb.org/tracker/index.php?func=detail&aid=308076&grou > p_id=168&atid=350207 > > Do you have a way of working around this behavior? > > -Erik > > On Dec 18, 2007, at 9:53 AM, Park, Michael wrote: > >> Hello, >> >> I sent the below email out twice. I was wondering if anyone had any >> ideas. Is my email clear enough? >> >> Thanks again, >> Mike >> >> >> -------- >> >> I've run into a situation where an 'xforms:delete' is being >> recognized as a 'xforms-value-changed' event in a repeat. This is >> then causing an 'xforms:setvalue' action to occur. I believe this >> is a bug (when I perform a similar task in FireFox it works fine). >> >> I've attached the code and here is the link to the code (for the >> sandbox): http://dl.lib.brown.edu/mwp/xforms/genre.xhtml. You will >> see I've placed a message in the xforms-value-changed to show that >> the delete is causing a change. >> >> *NOTE: the delete problem occurs at an inner position(). So add 3 >> or more and delete position 2. In other words, it never happens for >> the last or first node. >> >> Thanks, >> Mike >> <genre.xhtml> >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |