Closed Bug 345865 Opened 18 years ago Closed 18 years ago

filename and mediatype elements for <upload> are not set in instance

Categories

(Core Graveyard :: XForms, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspeiche, Assigned: aaronr)

References

()

Details

(Keywords: fixed1.8.0.8, fixed1.8.1.1)

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060719 Minefield/3.0a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060719 Minefield/3.0a1 According to spec 8.3.1(filename) and similarly in 8.3.2(mediatype) states: "Binding attributes on optional element filename specify the location in the instance for the parent element upload, when activated, to place the filename for the chosen binary resource." Both values are echoed but this happens regardless of the output elements. So appears the instance nodes are not being updated. Reproducible: Always
Attached file testcase (deleted) —
Blocks: 322255
should also note that this is a non-normative testcase from the w3c suite, so should have lower priority
This is a regression. This worked in 0.5. Looks like the patch for bug 275453 is what screwed it up. Though that went into the tree in October so that doesn't make sense. Hmmmm... Pretty simple fix, though.
Assignee: xforms → aaronr
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #3) > This is a regression. This worked in 0.5. Looks like the patch for bug 275453 > is what screwed it up. Though that went into the tree in October so that > doesn't make sense. Hmmmm... Pretty simple fix, though. > My mistake. The patch that got this working was for bug 275453. The patch that broke it was for bug 300591. Stopped setting the bound value of the filename and mediatype elements and instead set the node value of the elements directly. I think all I have to do is change it back. I just got to make sure I don't cause any other regression by doing this.
Status: NEW → ASSIGNED
Attached patch patch (obsolete) (deleted) — Splinter Review
putting back in the nsXFormsUtils::SetSingleNodeBindingValue function that Allan removed in bug 300591. I think that he thought it only set the node value for the node passed in. What it does is resolve the single node binding for the xforms element that is passed in and THEN sets the node value for that resolved bound node. Doing it this way means that we don't have to make xf:filename and xf:mediatype full blown xforms controls.
Attachment #230621 - Flags: review?(allan)
Comment on attachment 230621 [details] [diff] [review] patch Yeah, that seems to be my bad. > /** >+ * Convenience method for doing XPath evaluations to set string value >+ * for an element. >+ * Returns PR_TRUE if the evaluation succeeds. >+ */ >+ static NS_HIDDEN_(PRBool) >+ SetSingleNodeBindingValue(nsIDOMElement *aElement, const nsAString &aValue, >+ PRBool *aChanged); Although looking at the comment, I can see why I was confused. Could you please change the comment so it actually says what the function does :) The return value description is also wrong.
Attachment #230621 - Flags: review?(allan) → review+
Attachment #230621 - Attachment is obsolete: true
Attachment #230770 - Flags: review?(doronr)
Attachment #230770 - Flags: review?(doronr) → review+
checked into trunk
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
checked into 1.8.0 branch on 2006/09/21
Keywords: fixed1.8.0.8
checked into 1.8 branch on 2006/11/21
Keywords: fixed1.8.1.1
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: