Ticket #6212 (new defect)

Opened 8 months ago

Last modified 8 months ago

Cannot define ItemFileWriteStore._saveCustom with dojo/method SCRIPT tag

Reported by: ptwobrussell Owned by: alex
Priority: normal Milestone: 1.4
Component: Core Version: 1.0
Severity: normal Keywords:
Cc: ptwobrussell@…

Description

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

Changed 8 months 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

Changed 8 months ago by bill

  • owner changed from anonymous to alex
  • milestone set to 1.4

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.

Note: See TracTickets for help on using tickets.