Ext.define("Portfolio.designer.ui.DataModels", {

	extend: "Ext.form.field.ComboBox",

	valueField: "value",

	displayField: "key",

	alias: [
		"widget.ip2DataModels"
	],

	store: Ext.create("Ext.data.Store", {
		fields: ["key", "value"],
		proxy: {
			type: "ajax",
			url: "ip2-services/ip2Services.aspx",
			extraParams: {
				plugin: "",
				func: "getDataModels"
			},
			reader: {
				type: "json",
				rootProperty: "rows",
				totalProperty: "totalRows"
			}
		}
	}),

	help: [
		"Datamodel are just tables if you have selected the DB/2 plugin.",
		"In that case specify the library slash file name like NORTHWIND/CUSTOMERS.",
		"If you want a list of tables in a library just enter the library name and the slash and wait a coulple of seonds an the list of tables will apear. ",
		"Also use the * to search for a generic name. Datamodels can also be customer specific APIs like in i.e. MOVEX"
	].join("\n")
});
