Hi,
There is nice example of an xform that shows a summary of the errors in a page in the xforms-sandbox application (http://www.orbeon.com/ops/xforms-sandbox/sample/error-summary). However, it appears to have a bug, because it doesn't properly show the errors at first, although it does list the number of errors correctly. It seems that when the errors are added to the errors-instance, the required values are not stored. If you then fix the error and then make it wrong again, you correctly see that error in the summary. The error count will be wrong though, so the error seems to be added to the 'empty' errors already in the errors-instance. The fix for the bug is to change these two lines of code: <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('xxforms:target')"/> <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('xxforms:repeat-indexes'), '-')"/> If you replace index('errors-repeat') by last() for both lines of code it works correctly. Perhaps this should be fixed for the next Orbeon release. Regards, Wouter Zelle PS. I also found the following documentation for this sample code with the same bug: http://www.orbeon.com/blog/2006/08/04/xforms-tip-creating-a-configurable-error-summary/ -- 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
|
Absolutely right!
I fixed this in the CVS. -Erik On Jun 5, 2009, at 8:09 AM, Wouter Zelle wrote: > Hi, > > There is nice example of an xform that shows a summary of the errors > in a page in the xforms-sandbox application (http://www.orbeon.com/ops/xforms-sandbox/sample/error-summary > ). However, it appears to have a bug, because it doesn't properly > show the errors at first, although it does list the number of errors > correctly. It seems that when the errors are added to the errors- > instance, the required values are not stored. If you then fix the > error and then make it wrong again, you correctly see that error in > the summary. The error count will be wrong though, so the error > seems to be added to the 'empty' errors already in the errors- > instance. > > The fix for the bug is to change these two lines of code: > > <xforms:setvalue ref="instance('errors-instance')/ > error[index('errors-repeat')]/@id" value="event('xxforms:target')"/> > <xforms:setvalue ref="instance('errors-instance')/ > error[index('errors-repeat')]/@indexes" value="string- > join(event('xxforms:repeat-indexes'), '-')"/> > > If you replace index('errors-repeat') by last() for both lines of > code it works correctly. Perhaps this should be fixed for the next > Orbeon release. > > Regards, > > Wouter Zelle > > PS. I also found the following documentation for this sample code > with the same bug: http://www.orbeon.com/blog/2006/08/04/xforms-tip-creating-a-configurable-error-summary/ > > -- > 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 |
In reply to this post by Wouter Zelle
I just cam across this exact same problem today. My errors were working correctly previously and then all of a sudden what you describe is occuring. However, I tried your solution and it is still producing the same result, an empty error on the first error encountered. We are rolling out our application next week and this is a major issue for us. Is there anything else we can do? Thanks.
|
In reply to this post by Wouter Zelle
Never mind - forget about my previous post. The solution stated does work - my edits were being conducted in a file that was not being displayed in the browser. My apologies.
|
In reply to this post by bsteuhl
If you post your error-processing code, we might be able to see what's wrong.
Regards, Wouter Zelle On Mon, Jun 22, 2009 at 22:45, brian18425 <[hidden email]> wrote:
-- 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 |