Ticket #7605 (closed defect: fixed)
dijit.tree.ForestStoreModel throws error on newItem
| Reported by: | rjones | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Dijit | Version: | 1.2beta |
| Severity: | normal | Keywords: | |
| Cc: |
Description
If a dijit.tree.ForestStoreModel? is created with an store with 0 items an error is thrown during the store.newItem process because dijit.tree.ForestStoreModel?._requeryTop does not check to make sure that the root has children. One workaround is to extend dijit.tree.ForestStoreModel? and extend the _requeryTop function:
dojo.declare("dijit.tree.WorkingForestStoreModel?", [dijit.tree.ForestStoreModel?], {
/**
- dijit.tree.ForestStoreModel? has a bug that presents when you create
- a model with an empty store and call newItem an error occurs because
- the root has no children and there was no null check.
- @Override */
_requeryTop: function(){
if ( this.root.children ) {
this.constructor.superclass._requeryTop.apply(this);
}
}
});
Attachments
Change History
Note: See
TracTickets for help on using
tickets.