PDA

View Full Version : where is ds config param in the doc?



bhomass
23 Oct 2007, 4:32 PM
It must be me, but I get lost very easily in the documentation.

for example, in many of the grid examples, you see cm: and ds: as configuration parameters. I know what they mean, and can locate cm in the doc page. But I looked all over for ds:, and can not find it anywhere. I did keep checking up the class hierarchy hoping to find it in one of superclasses. So, what's the trick here? where is ds documented?

The reason it is important is because I am wondering whether Panel can accept ds: as a config param. If ds is not listed for Panel, and also not for GridPanel, which definitely recognizes ds, it makes it hard for me to know whether I am on the right track.

JeffHowden
23 Oct 2007, 4:41 PM
In the grid examples that you find "ds", it's simply a locally scoped variable reference to an instance of the Ext.data.Store() class.

bhomass
23 Oct 2007, 4:44 PM
don't think so. unless I am even more lost.

here is the code

var grid = new Ext.grid.EditorGridPanel({
ds: ds,

the second ds is a variable of Store, but the first is a config param.

DigitalSkyline
23 Oct 2007, 5:09 PM
... a data.Store object is the expected argument of ds. To configure the data.Store you need to reference that object's configuration options.

bhomass
23 Oct 2007, 5:52 PM
people seem to be very confused by my question.

I want to confirm that
1. ds is indeed a config param of EditorGridPanel.
2. why is ds not listed as a config param of EditorGridPanel in the documentation?

aconran
23 Oct 2007, 6:07 PM
bhomass -

The configuration option is named store.
http://extjs.com/deploy/dev/docs/?class=Ext.grid.EditorGridPanel&member=store

bhomass
23 Oct 2007, 7:08 PM
please help unconfuse me.

how did ds: get translated into store:?

I understand there is the declaration
var ds = new Ext.data.Store({

I can see how this is used as the second ds in
ds: ds

but how can the first ds: replace store:?

ckr
23 Oct 2007, 7:10 PM
Looks like the new name will be store, however when looking at the source, they are checking to see if ds is set. If so, then store = ds is performed.

Either will work, however, the new convention will be to use store instead of ds.

Note: the same goes for cm and colModel and sm and selModel (except those ARE documented as shorthands, where as ds is not documented).

bhomass
23 Oct 2007, 7:17 PM
so I am not crazy. it really is missing from the documentation. I should feel so relieved.

ckr
23 Oct 2007, 7:21 PM
Nope, not crazy :))

Remember, we are still in beta. You have the source, do not hesitate to look at it. That has helped me a number of times (though I do not always grasp what I am looking at ;) )

brian.moeskau
23 Oct 2007, 8:10 PM
In earlier versions it was DataSource (ds). The new nomenclature is "store" but it was aliased for compatibility (and because "Data Store" still works as ds).