Test 10.8.e needs work

Test  10.8.e purports to test the dispatch of a cancelled event.

The ev:event attribute was placed on the model element, not on the action 
element that shows the message proving that the event was dispatched.  So, 
the test requires that one should *not* see a message for the 
custom-event, but the reason you don't see it is that the event attributes 
are incorrect.

The ev:event attribute needs to be attached to the action element within 
the model. 

The model also has no instance, which is required, so I would not expect 
this form to work.

However, we already have a test 10.8.d that tests dispatching a custom 
event.  This test purports to test a cancelled event, i.e. one with a and 
ev:defaultAction of cancel.  However, the test assumes that cancelling the 
default action would cause the event bubble phase not to happen. The test 
needs to use stopPropagation instead.  Then, another action handler needs 
to be added to observe the parent of the event target instead.

So, I think this test should change by 
1) adding an instance with an ID
2) targeting the custom event at the instance, not the model
3) attaching the ev:event and stopPropagation on the xforms action in the 
model.

Then, we can claim that you shouldn't see the message.

Thanks,
John M. Boyer, Ph.D.
STSM, Lotus Forms
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 
http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw

Received on Thursday, 4 February 2010 16:08:11 UTC