The default bug view has changed. See this FAQ.

notify controls if the datatype of their bound node changes

RESOLVED WONTFIX

Status

Core Graveyard
XForms
RESOLVED WONTFIX
12 years ago
9 months ago

People

(Reporter: jhp (no longer active), Assigned: jhp (no longer active))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

12 years ago
In the <upload> element, if the dataype of the node the element is bound to changes, then the file data should be reset.  That is, if the <upload> element is bound to datatype of "anyURI", selecting a file sets the path URL in the node.  If the dataype changes to "base64Binary", then the file contents should be encoded and set in the instance node, without having the user select the file again.  Or, if the dataype is set to an invalid datatype (not one of "anyURI", "base64Binary", or "hexBinary"), then the instance data should be cleared.
(Assignee)

Comment 1

12 years ago
Created attachment 200758 [details]
Testcase

Allan's testcase from bug 275453, but added a "none" selection.

Comment 2

11 years ago
should we generalize this bug even further and say that if the MDG detects that the type of an instance node changes then the control(s) bound to that instance node should be refreshed?  It isn't quite the same thing as this bug was originally on, because most controls bound to a data type won't actually change the instance data based on that type so if they miss out on knowing the datatype changed, then it isn't quite that big of deal.  It is just how the data is represented to the user.  Whereas with this instance of upload, the actual submitted data could be affected by such a type change.  But this bug got me thinking that maybe if we DID refresh controls when the type changes, then upload would just need to handle this during refresh.

Comment 3

11 years ago
Created attachment 209648 [details]
testcase for input control bound to a changeable type

In case we persue my thought on changing control types, then here is a testcase for it.

Comment 4

11 years ago
(In reply to comment #2)
> should we generalize this bug even further and say that if the MDG detects that
> the type of an instance node changes then the control(s) bound to that instance
> node should be refreshed?

Yes, I think we should. But it should not be an xforms-refresh. Either we should call a function directly, or have an mozilla-xforms-datatype-change-whatever-blah event.
Summary: In upload, should reset file data if instance node datatype changes → notify controls if the datatype of their bound node changes

Comment 5

11 years ago
I took a decision for this in bug 313315. Now, we just do a normal rebind (and refresh). Marking this bug WONTFIX.

If there is a need for something more / different, this can be reopened.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.