form runner error summary component and deleted nodes?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

form runner error summary component and deleted nodes?

Scott Prater
I'm trying out the form runner error summary component, and for the most
part it works well.

However, I discovered that an error will persist, even if I delete the
node that contains the control that generated the error.  Is there a way
to clear form runner errors on delete events?

Attached is a errsummtest.html, a simple XForms that shows the behavior.

1.  Click on "Add some test data" twice, get two new test data fields.

2.  Insert some data in the second field.  Then click in the first
field, then again in the second field.  You should then see an error
message pop up:  "1. Data: [1] - Field cannot be empty."

3.  Click on the "Delete" link above the first field.

The field has disappeared, the element is no longer in the model
instance being filled in, but the error persists.

I've tried using the error summary widget in non-incremental mode, and
playing with fr-clear, and fr-update, and xforms:refresh to reset the
state of the form, but I haven't yet been able to figure out a way to
clear the error.  Any help would be greatly appreciated.

thanks,

-- Scott
--
Scott Prater
Library, Instructional, and Research Applications (LIRA)
Division of Information Technology (DoIT)
University of Wisconsin - Madison
[hidden email]


Form Runner Error Summary Test Your Form Contains the Following Errors

Add some test data

Test Data Delete

Data: Field cannot be empty. Insert test data here


--
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
Reply | Threaded
Open this post in threaded view
|

Re: form runner error summary component and deleted nodes?

Scott Prater
Well, I found a workaround:

In my delete trigger, I can dispatch this event just before I delete the
node:

<xforms:dispatch name="xforms-valid" ev:event="DOMActivate"
target="testdata" />

... where "testdata" is the ID of the control being observed (I added
id="testdata" to my input field control).

But is there an easier way, or more elegant way, to accomplish the same
thing?  Some way to listen for xform-delete events, and get the
information from the event to know which control(s) to send an
xform-valid event to?  I have dozens of controls in my form, and I'd
prefer not to make the form even more verbose by dispatching an explicit
xforms-valid event every time one is deleted.

thanks,

-- Scott

Scott Prater wrote:

> I'm trying out the form runner error summary component, and for the most
> part it works well.
>
> However, I discovered that an error will persist, even if I delete the
> node that contains the control that generated the error.  Is there a way
> to clear form runner errors on delete events?
>
> Attached is a errsummtest.html, a simple XForms that shows the behavior.
>
> 1.  Click on "Add some test data" twice, get two new test data fields.
>
> 2.  Insert some data in the second field.  Then click in the first
> field, then again in the second field.  You should then see an error
> message pop up:  "1. Data: [1] - Field cannot be empty."
>
> 3.  Click on the "Delete" link above the first field.
>
> The field has disappeared, the element is no longer in the model
> instance being filled in, but the error persists.
>
> I've tried using the error summary widget in non-incremental mode, and
> playing with fr-clear, and fr-update, and xforms:refresh to reset the
> state of the form, but I haven't yet been able to figure out a way to
> clear the error.  Any help would be greatly appreciated.
>
> thanks,
>
> -- Scott
>

--
Scott Prater
Library, Instructional, and Research Applications (LIRA)
Division of Information Technology (DoIT)
University of Wisconsin - Madison
[hidden email]


--
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