Close Form - Close Document

From W3C XForms Group Wiki (Public)

LeighKlotz to start.

Requirements and lack thereof

Close Form is listed in the XForms 1.1 Requirements Document

We removed it from XForms 1.1 minutes because of the lack of notifications and the lack of time to finish them.

Issues laundry list

There are issues about notification and hooks.

What about multiple models per document?

We should provide declarative access to at least the functionality offered by JavaScript onload and onbeforeunload operations with XML events: http://www.faqts.com/knowledge_base/view.phtml/aid/5853

Security concerns

The functionality of onbeforeunload is limited to providing string content to the OK/Cancel dialog. The user agent provides the dialog itself and handles the interpretation, presuambly for security reasons. If we choose to make the xforms-close event be cancellable then we will security issues with non-closable forms.

Half-baked proposals

Maybe we should have an event that can be targeted (at the model? at the page? at some arbitrary id withd ispatch?) that requests the close, and then an info event (xforms-closing?) that's dispatched (at the model? at all models?) that says the closure is happening, and perhaps the model(s) can add text to the event context which is a string to be presented to the user as in onbeforeunload.