Last Comment Bug 313766 - notify controls if the datatype of their bound node changes
: notify controls if the datatype of their bound node changes
Status: RESOLVED WONTFIX
:
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: jhp (no longer active)
: Stephen Pride
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-25 10:04 PDT by jhp (no longer active)
Modified: 2016-07-15 14:46 PDT (History)
5 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Testcase (2.35 KB, application/xhtml+xml)
2005-10-25 10:05 PDT, jhp (no longer active)
no flags Details
testcase for input control bound to a changeable type (1.46 KB, application/xhtml+xml)
2006-01-25 17:00 PST, aaronr
no flags Details

Description jhp (no longer active) 2005-10-25 10:04:02 PDT
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.
Comment 1 jhp (no longer active) 2005-10-25 10:05:50 PDT
Created attachment 200758 [details]
Testcase

Allan's testcase from bug 275453, but added a "none" selection.
Comment 2 aaronr 2006-01-25 16:57:29 PST
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 aaronr 2006-01-25 17:00:15 PST
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 Allan Beaufour 2006-02-03 05:43:16 PST
(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.
Comment 5 Allan Beaufour 2006-05-30 06:43:23 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.