Opened 12 years ago

Last modified 8 years ago

#6212 closed defect

Cannot define ItemFileWriteStore._saveCustom with dojo/method SCRIPT tag — at Version 3

Reported by: ptwobrussell Owned by: alex
Priority: low Milestone: future
Component: Data Version: 1.0
Keywords: Cc: ptwobrussell@…
Blocked By: Blocking:

Description (last modified by bill)

I noticed tonight (r13076) that doing something like

<div dojoType="dojo.data.ItemFileWriteStore" url="/foobar" jsId="fooStore">
    <script type="dojo/method" event="_saveCustom" args="saveCompleteCallback, saveFailedCallback">
        alert("foobar!!!");
    </script>
</div>

doesn't actually do anything. After you supposedly wire it up, you can go into Firebug and execute fooStore._saveCustom and you won't get anything back. However, if you rig that same thing up in dojoAddOnLoad by directly assigning an anonymous functionto fooStore._saveCustom, then all is well (obviously.)

The only telling sign I noticed is that _saveCustom isn't explicitly defined in ItemFileWriteStore?...but I thought that the dojo/method scripts should have worked anyway....so I'll log this as a Core problem (?)

Change History (3)

comment:1 Changed 12 years ago by ptwobrussell

Noticed this in the support forum. Apparently, this issue has been going on since Nov 07 (at least.)

http://dojotoolkit.org/forum/dojo-core-dojo-0-9/dojo-core-support/custom-event-not-firing-when-saving-itemfilewritestore

comment:2 Changed 12 years ago by bill

Milestone: 1.4
Owner: changed from anonymous to alex

Hmm, well if you had specified the _saveCustom parameter in the tag, like <div dojoType="ItemFileReadStore" _saveCustom="foo">, since _saveCustom isn't declared in the prototype I would just close this as "not a bug". For <script> maybe we can do something better although not sure. Will leave to Alex.

comment:3 Changed 10 years ago by bill

Component: CoreParser
Description: modified (diff)
Note: See TracTickets for help on using tickets.