Closed
Bug 332803
Opened 18 years ago
Closed 18 years ago
elements with xsi:type are not validated on form load
Categories
(Core Graveyard :: XForms, defect, P1)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allan, Assigned: allan)
References
()
Details
(Keywords: fixed1.8.0.5, fixed1.8.1)
Attachments
(2 files, 1 obsolete file)
We do not seem to validate elements with types set directly by xsi:type on form load.
Assignee | ||
Comment 1•18 years ago
|
||
Assignee | ||
Updated•18 years ago
|
Priority: -- → P1
The problem here is that during initialization an instance node won't be inserted into the MDG unless it is bound via a xf:bind. So when we rebuild, recalculate and revalidate during form initialization, the nodes that are bound via @ref and have xsi:type on them won't be in the MDG, won't be picked up by recalculate and thus won't be validated by revalidate. In the testcase when the node value is changed to another invalid value, it will correctly display as invalid because SetValue will mark the node as changed and thus it will go into the MDG to be picked up by recalculate and then used by revalidate which will call ValidateNode on it. I don't know what the right answer is, though. Maybe ValidateDocument should return a list of invalid nodes and we should then mark all of the controls bound to those nodes as invalid?
Or maybe in when an instance is through loading it should mark every node it contains as dirty?
Assignee | ||
Comment 4•18 years ago
|
||
(In reply to comment #2) > I don't know what the right answer is, though. Maybe ValidateDocument should > return a list of invalid nodes and we should then mark all of the controls > bound to those nodes as invalid? Afaik, ValidateDocument() just bails when it finds something which is not valid, does it not? (In reply to comment #3) > Or maybe in when an instance is through loading it should mark every node it > contains as dirty? That would add every instance data node to the MDG or to the list :( I've never been really keen on our (my) type handling, but it does make sure that we only check types for nodes that change value -- which is nice :) Maybe we should just make sure that all instance data nodes that have controls bound to them exist in the MDG?
Assignee | ||
Comment 5•18 years ago
|
||
(In reply to comment #4) > Maybe we should just make sure that all instance data nodes that have controls > bound to them exist in the MDG? Best plan so far, I'll chew on it.
Assignee: aaronr → allan
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•18 years ago
|
||
Use xsd:date instead of custom type, and add inline schema attached type too
Attachment #217273 -
Attachment is obsolete: true
Assignee | ||
Comment 7•18 years ago
|
||
Every time the MDG creates a new node, it will type check it. This only happens one time (per rebuild), which is the first time a node is accessed by a control.
Attachment #222864 -
Flags: review?(doronr)
Updated•18 years ago
|
Attachment #222864 -
Flags: review?(doronr) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #222864 -
Flags: review?(aaronr)
Attachment #222864 -
Flags: review?(aaronr) → review+
Assignee | ||
Comment 8•18 years ago
|
||
Fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Assignee | ||
Updated•18 years ago
|
Keywords: fixed1.8.1
Assignee | ||
Updated•18 years ago
|
Keywords: fixed1.8.0.5
Assignee | ||
Updated•18 years ago
|
Whiteboard: xf-to-branch
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•