#6212 closed defect (wontfix)
Cannot define ItemFileWriteStore._saveCustom with dojo/method SCRIPT tag
Reported by: | ptwobrussell | Owned by: | dylan |
---|---|---|---|
Priority: | low | Milestone: | future |
Component: | Data | Version: | 1.0 |
Keywords: | Cc: | ptwobrussell@… | |
Blocked By: | Blocking: |
Description (last modified by )
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 (?)
Attachments (1)
Change History (10)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
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
Component: | Core → Parser |
---|---|
Description: | modified (diff) |
comment:4 Changed 10 years ago by
Milestone: | 1.4 → future |
---|
comment:6 Changed 8 years ago by
I'm running into this issue with v1.7; it doesn't seem like any custom methods can be assigned to the ItemFileReadStore/ItemFileWriteStore? (and likely other modules) using script tags, though this doesn't seem to be an issue for other Dojo modules. Is there a mixin that provides that functionality? In the case of _saveCustom/_saveEverything, perhaps it would be best to declare them in the module as false? That shouldn't affect the behaviour of the module.
comment:7 Changed 8 years ago by
Keywords: | needsreview added |
---|---|
Priority: | high → low |
Bill is any of kitson's work possibly going to fix this?
comment:8 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
No, the parser is already calling
new dojo.data.ItemFileWriteStore({ _saveCustom: ... });
The "problem" is that the ItemFileWriteStore "widget" doesn't mixin it's attributes.
The new dojo.store.Memory does actually mixin the values, so the code snippet below will work:
<div dojoType="dojo.store.Memory" jsId="fooStore"> <script type="dojo/method" event="_saveCustom" args="saveCompleteCallback, saveFailedCallback"> alert("foobar!!!"); </script> </div>
Of course the Memory store doesn't take a URL.
Anyway, I guess we should close this as wontfix.
comment:9 Changed 8 years ago by
Component: | Parser → Data |
---|---|
Keywords: | needsreview removed |
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