Ext.define("Portfolio.Defaults.uirules", {

	singleton: true,

	alternateClassName: [
		"ip2.uirules",
		"ip2.default.uirules"
	],

	flatten: null,

	allProperties: null,

	constructor: function (o_config) {

		var i_self = this;

		Ext.apply(i_self, {
			properties: {
				type: {
					title: "",
					type: "varchar"
				},
				name: {
					title: "",
					type: "varchar",
					category: "system"
				},
				allowBlank: {
					title: "",
					type: "boolean",
					alias: [
						"<% data.required ? !data.required : data.allowBlank %>",
						"<% data.isMandatory ? !data.isMandatory : data.allowBlank %>"
					],
					category: "system"
				},
				emptyText: {
					title: "",
					value: "",
					alias: [
						"placeholder"
					],
					type: "varchar",
					category: "system"
				},
				readOnly: {
					title: "",
					type: "boolean",
					alias: [
						"readonly",
						"disallowcreate",
						"disallowCreate"
					],
					value: false,
					category: "system"
				},
				selectOnFocus: {
					type: "boolean",
					value: false
				},
				disabled: {
					type: "boolean",
					title: "",
					value: false,
					category: "system"
				},
				hidden: {
					type: "boolean",
					category: "system"
				},
				hideLabel: {
					type: "boolean",
					category: "system"
				},
				fieldLabel: {
					title: "",
					type: "varchar",
					category: "system",
					alias: [
						"title"
					]
				},
				labelWidth: {
					type: "number",
					category: "system"
				},
				labelSeparator: {
					type: "varchar",
					category: "system"
				},
				labelStyle: {
					type: "object",
					category: "system"
				},
				flex: {
					type: "number",
					value: "",
					category: "system"
				},
				anchor: {
					type: "varchar",
					category: "system"
				},
				width: {
					type: "number",
					category: "system"
				},
				minWidth: {
					type: "number",
					alias: [
						"minwidth"
					],
					category: "system"
				},
				maxWidth: {
					type: "number",
					alias: [
						"maxwidth"
					],
					category: "system"
				},
				height: {
					type: "number",
					category: "system"
				},
				minHeight: {
					type: "number",
					alias: [
						"minheight"
					],
					category: "system"
				},
				maxHeight: {
					type: "number",
					alias: [
						"maxheight"
					],
					category: "system"
				},
				margin: {
					type: "varchar"
				},
				length: {
					title: "",
					type: "integer",
					category: "system"
				},
				validator: {
					type: "string",
					category: "system"
				},
				tooltip: {
					type: "object",
					category: "system"
				},
				sequence: {
					type: "number",
					alias: [
						"index"
					],
					value: -1,
					category: "system"
				},
				value: {
					title: "",
					type: "varchar",
					category: "system"
				},
				group: {
					type: "varchar",
					category: "system"
				},
				characterCount: {
					type: "object",
					__api__: {
						countdown: true,
						textPre: {
							da: "Du har",
							en: "You have"
						},
						textSeperator: {
							da: "af",
							en: "Of"
						},
						textPost: {
							da: "tegn tilbage",
							en: "characters left"
						},
						warningThreshold: 20,
						length: 66,
						lowerThreshold: 29
					},
					category: "system"
				},
				isWidget: {
					type: "boolean",
					value: false,
					category: "system"
				},
				i18n: {
					type: "boolean",
					value: false,
					category: "system"
				},
				propertyHost: {
					type: "varchar",
					value: "",
					category: "system"
				},
				borrow: {
					type: "object",
					title: "",
					__api__: {
						from: {
							type: "varchar",
							title: "The property to borrow from"
						},
						trigger: {
							type: "varchar",
							title: "The trigger when the borrowing happens",
							value: "blur"
						},
						conditionFn: {
							type: "varchar",
							title: "A condition method to return true or false to allow borrow"
						}
					},
					category: "system"
				},
				dependsOn: {
					type: "array",
					title: "",
					__api__: {
						field: {
							type: "varchar",
							title: "The field to depend on from"
						},
						equal: {
							type: "*ALL",
							title: "The value that field should have",
							optional: true
						},
						notEqual: {
							type: "*ALL",
							title: "The value that field should NOT have",
							optional: true
						},
						empty: {
							type: "boolean",
							title: "Depend on the field to have NO value",
							optional: true
						},
						notEmpty: {
							type: "boolean",
							title: "Depend on the field to have a value",
							optional: true
						},
						service: {
							type: "object",
							title: "This is the config for a service call",
							exsample: {
								url: "your/url.aspx",
								params: {
									a: 1,
									b: 2,
									c: 3
								}
							}
						},
						clearOnChange: {
							type: "boolean",
							value: false
						}
					},
					category: "system"
				},
				sanitizeFn: {
					title: "",
					type: "varchar",
					category: "system"
				},
				uitype: {
					title: "",
					type: "varchar",
					category: "system"
				},
				uiclass: {
					title: "",
					type: "varchar",
					category: "system"
				},
				langContext: {
					title: "property_cid_title",
					dbType: "varchar",
					value: "portfolio",
					category: "system"
				},
				__cid__: {
					title: "property_cid_title",
					dbType: "integer",
					length: 5,
					private: true,
					category: "system"
				}
			},
			collections: {
				display: {
					id: -1,
					apply: {
						type: "varchar",
						readOnly: true
					}
				},
				entitycombo: {
					id: -2,
					apply: {
						type: "entitypicker"
					}
				},
				markdown: {
					id: -3,
					apply: {
						type: "markdowneditor"
					}
				},
				single_select: {
					id: -4,
					apply: {
						type: "picker"
					}
				},
				bool: {
					id: -5,
					apply: {
						type: "boolean"
					}
				},
				dec: {
					id: -6,
					apply: {
						type: "number"
					}
				},
				i18n: {
					id: -21,
					apply: {
						type: "i18ntextfield"
					}
				},
				i18nText: {
					id: -7,
					apply: {
						type: "i18ntextfield"
					}
				},
				call2actionGrid: {
					id: -8,
					apply: {
						type: "call2action"
					}
				},
				hidden: {
					id: -9,
					apply: {
						type: "varchar",
						hidden: true,
						readOnly: true
					}
				},
				imagepicker: {
					id: -10,
					apply: {
						type: "uploadpicker"
					}
				},
				integer: {
					id: -11,
					apply: {
						type: "number",
						decimalPrecision: 0
					}
				},
				password: {
					id: -12,
					apply: {
						type: "varchar",
						inputType: "password"
					}
				},
				imageuploadpicker: {
					id: -13,
					apply: {
						type: "uploadpicker"
					}
				},
				timestamp: {
					id: -14,
					apply: {
						type: "isotimestamp"
					}
				},
				char: {
					id: -15,
					apply: {
						type: "varchar"
					}
				},
				numeric: {
					id: -16,
					apply: {
						type: "number"
					}
				},
				decimalnumber: {
					id: -17,
					apply: {
						type: "number"
					}
				},
				string: {
					id: -18,
					apply: {
						type: "varchar"
					}
				},
				decimal: {
					id: -19,
					apply: {
						type: "number"
					}
				},
				bigint: {
					id: -20,
					apply: {
						type: "number",
						decimalPrecision: 0
					}
				},
				smallint: {
					id: -21,
					apply: {
						type: "boolean",
						uncheckedValue: 0,
						inputValue: 1
					}
				},
				varchar: {
					id: 1,
					title: "Regular text",
					type: "varchar",
					properties: {
						type: {
							type: "varchar",
							value: "varchar"
						},
						uitype: {
							type: "varchar",
							value: "textfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.Text"
						},
						value: {
							type: "varchar"
						},
						vtype: {
							type: "varchar"
						},
						vtypeText: {
							type: "varchar",
							alias: [
								"errorMessage"
							]
						},
						stripCharsRe: {
							type: "varchar"
						},
						enforceMaxLength: {
							type: "boolean",
							value: false
						},
						inputType: {
							type: "varchar",
							value: ""
						},
						triggers: {
							type: "object",
							value: null
						},
						minLength: {
							type: "number"
						},
						maxLength: {
							type: "number"
						},
						regexp: {
							type: "varchar"
						},
						seoValidation: {
							type: "object"
						}
					}
				},
				number: {
					id: 2,
					title: "Regular number",
					type: "number",
					properties: {
						type: {
							type: "varchar",
							value: "number"
						},
						uitype: {
							type: "varchar",
							value: "decimal"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.Number"
						},
						minValue: {
							type: "integer"
						},
						maxValue: {
							type: "integer"
						},
						decimalSeparator: {
							type: "varchar",
							value: ""
						},
						decimalPrecision: {
							type: "integer",
							value: 0,
							alias: [
								"decPoint"
							]
						},
						allowDecimals: {
							type: "boolean",
							value: true
						},
						submitLocaleSeparator: {
							type: "boolean",
							value: false
						},
						value: {
							type: "integer"
						},
						vtype: {
							type: "varchar"
						},
						enforceMaxLength: {
							type: "boolean",
							value: false
						}
					}
				},
				boolean: {
					id: 3,
					title: "Boolean",
					type: "boolean",
					properties: {
						type: {
							type: "varchar",
							value: "boolean"
						},
						uitype: {
							type: "varchar",
							value: "checkboxfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.Checkbox"
						},
						inputValue: {
							type: "boolean",
							alias: [
								"onValue"
							]
						},
						uncheckedValue: {
							type: "boolean",
							alias: [
								"offValue"
							]
						},
						boxLabel: {
							type: "varchar",
							alias: [
								"boxlabel"
							]
						},
						value: {
							type: "boolean"
						}
					}
				},
				date: {
					id: 4,
					title: "Datepicker",
					type: "date",
					properties: {
						type: {
							type: "varchar",
							value: "date"
						},
						uitype: {
							type: "varchar",
							value: "datefield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.Date"
						},
						minValue: {
							type: "varchar",
							alias: [
								"mindate",
								"minDate"
							]
						},
						maxValue: {
							type: "varchar",
							alias: [
								"maxdate",
								"maxDate"
							]
						},
						minDateBind: {
							type: "varchar",
							alias: [
								"mindatebind"
							]
						},
						maxDateBind: {
							type: "varchar",
							alias: [
								"maxdatebind"
							]
						},
						format: {
							type: "varchar",
							value: ""
						},
						submitFormat: {
							type: "varchar",
							value: "Y-m-d"
						},
						vtype: {
							type: "varchar"
						}
					}
				},
				entitypicker: {
					id: 5,
					title: "Entity picker, select a record from a entity in a DMD",
					type: "entitypicker",
					properties: {
						type: {
							type: "varchar",
							value: "entitypicker"
						},
						uitype: {
							type: "varchar",
							value: "entitypicker"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.EntityComboBox"
						},
						dmd: {
							title: "The DMD file to read from",
							type: "varchar",
							value: ""
						},
						entity: {
							title: "The name of the Entity",
							type: "varchar",
							value: ""
						},
						extraParams: {
							title: "Extra parametres for the DMD proxy",
							type: "object",
							__api__: {
								filter: ""
							}
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						},
						pageSize: {
							type: "integer",
							value: 20
						},
						view: {
							type: "varchar",
							value: "portfolio"
						},
						value: {
							type: "integer",
							value: ""
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							alias: [
								"typeahead"
							]
						},
						vtype: {
							type: "varchar"
						},
						preview: {
							type: "object"
						},
						valueField: {
							type: "varchar",
							value: ""
						},
						allowAdd: {
							ype: "boolean",
							value: false
						}
					}
				},
				mediagallery: {
					id: 6,
					title: "Media Gallery",
					type: "mediagallery",
					properties: {
						type: {
							type: "varchar",
							value: "mediagallery"
						},
						uitype: {
							type: "varchar",
							value: "galleryfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.gallery.Field"
						},
						value: {
							type: "varchar"
						},
						path: {
							type: "varchar",
							value: ""
						},
						maxItems: {
							type: "integer",
							alias: [
								"maxitems"
							]
						},
						allowUpload: {
							type: "boolean",
							value: true
						},
						extensions: {
							type: "array",
							value: [
								"jpg",
								"jpeg",
								"gif",
								"png"
							]
						},
						editorConfig: {
							type: "object",
							description: "These config settings will be merged on to the configuration for the editor window for records",
							api: {}
						},
						layoutConfig: {
							type: "object",
							api: {
								xpd: "pagelayout.xpd",
								__cid__: 1
							},
							value: false
						},
						linkConfig: {
							type: "object",
							__api__: {
								pages: {
									dmd: "",
									entity: ""
								},
								stacks: {
									dmd: "webshop.dmd",
									entity: "WSHSTCET00",
									xpd: "stack.xpd",
									proxy: "/wsh-services/wshproxy.aspx",
									cid: {
										root: 1,
										child: 2
									},
									environment: "stackpage",
									filter: "[{property: \"STCPNTTKN\", value:0}]"
								},
								documents: {
									path: "/uploads",
									extensions: [
										"pdf",
										"xls",
										"doc",
										"docx",
										"zip"
									],
									maxItems: 1,
									dropText: {
										en: "Drag-and-drop your documents here <br /><small>pdf, doc or zip</small>",
										da: "Træk-og-slip dine dokumenter her<br /><small>pdf, doc eller zip</small>"
									}
								}
							},
							value: false
						},
						actionColumns: {
							type: "object",
							__api__: {
								mobile: {
									type: "radiocheckbox",
									name: "mobile",
									context: "column",
									title: "Mobile",
									autoSelect: true,
									toolTip: {
										da: "",
										en: ""
									}
								},
								meta: {
									type: "radio",
									name: "meta",
									context: "column",
									title: "Meta",
									toolTip: {
										da: "",
										en: ""
									}
								},
								lightbox: {
									type: "checkbox",
									name: "lightbox",
									title: "Lightbox",
									toolTip: {
										da: "",
										en: ""
									}
								},
								brocure: {
									type: "radio",
									context: "row",
									name: "brocure",
									group: "document",
									toolTip: {
										da: "",
										en: ""
									}
								},
								guide: {
									type: "radio",
									context: "row",
									name: "guide",
									group: "document",
									toolTip: {
										da: "",
										en: ""
									}
								}
							}
						},
						dragText: {
							type: "object",
							value: {
								en: "Drag and drop the row to reorder",
								da: "Slip for at re-arrangere rækkefølge"
							}
						},
						dropText: {
							type: "object",
							value: {
								en: "Drag-and-drop your images here",
								da: "Træk-og-slip dine billeder her"
							}
						},
						progressUploadText: {
							type: "object",
							value: {
								da: "Overfører fil(er)...",
								en: "Uploading file(s)..."
							}
						},
						progressDoneText: {
							type: "object",
							value: {
								da: "Transaktion færdig!",
								en: "Transaction done!"
							}
						},
						progressCheckText: {
							type: "object",
							value: {
								da: "Undersøger fil(er)",
								en: "Checking file(s)"
							}
						},
						progressCheckDoneText: {
							type: "object",
							value: {
								da: "Færdig med at undersøge filer",
								en: "Done checking files"
							}
						},
						progressFailText: {
							type: "object",
							value: {
								da: "Fejl under overførsel",
								en: "Error in uploading"
							}
						},
						confirmRemoveRowText: {
							type: "object",
							value: {
								da: "Ønsker du virkelig at fjerne denne række?",
								en: "Do you really wish to remove this row?"
							}
						},
						confirmRemoveRowsText: {
							type: "object",
							value: {
								da: "Ønsker du virkelig at fjerne de valgte rækker?",
								en: "Do you really wish to remove the selected rows?"
							}
						},
						itemCreateTitle: {
							type: "object",
							value: {
								da: "Tilføj nyt emne",
								en: "Add new item"
							}
						},
						itemEditTitle: {
							type: "object",
							value: {
								da: "Rediger",
								en: "Edit"
							}
						},
						itemCreateText: {
							type: "object",
							value: {
								da: "Tilføj",
								en: "Add"
							}
						},
						itemEditText: {
							type: "object",
							value: {
								da: "Rediger",
								en: "Edit"
							}
						},
						itemRemoveText: {
							type: "object",
							value: {
								da: "Fjern",
								en: "Remove"
							}
						},
						ignoreStaticDir: {
							type: "boolean",
							value: true
						},
						mediaType: {
							type: "varchar",
							value: ""
						}
					}
				},
				mediagalleryrelation: {
					id: 25,
					title: "Media Gallery",
					type: "mediagalleryrelation",
					properties: {
						type: {
							type: "varchar",
							value: "mediagalleryrelation"
						},
						uitype: {
							type: "varchar",
							value: "mediagalleryfieldrelation"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.gallery.FieldRelation"
						},
						value: {
							type: "varchar"
						},
						path: {
							type: "varchar",
							value: ""
						},
						maxItems: {
							type: "integer",
							alias: [
								"maxitems"
							]
						},
						allowUpload: {
							type: "boolean",
							value: true
						},
						extensions: {
							type: "array",
							value: [
								"jpg",
								"jpeg",
								"gif",
								"png"
							]
						},
						editorConfig: {
							type: "object",
							description: "These config settings will be merged on to the configuration for the editor window for records",
							api: {}
						},
						layoutConfig: {
							type: "object",
							api: {
								xpd: "pagelayout.xpd",
								__cid__: 1
							},
							value: false
						},
						linkConfig: {
							type: "object",
							__api__: {
								pages: {
									dmd: "",
									entity: ""
								},
								stacks: {
									dmd: "webshop.dmd",
									entity: "WSHSTCET00",
									xpd: "stack.xpd",
									proxy: "/wsh-services/wshproxy.aspx",
									cid: {
										root: 1,
										child: 2
									},
									environment: "stackpage",
									filter: "[{property: \"STCPNTTKN\", value:0}]"
								},
								documents: {
									path: "/uploads",
									extensions: [
										"pdf",
										"xls",
										"doc",
										"docx",
										"zip"
									],
									maxItems: 1,
									dropText: {
										en: "Drag-and-drop your documents here <br /><small>pdf, doc or zip</small>",
										da: "Træk-og-slip dine dokumenter her<br /><small>pdf, doc eller zip</small>"
									}
								}
							},
							value: false
						},
						actionColumns: {
							type: "object",
							__api__: {
								mobile: {
									type: "radiocheckbox",
									name: "mobile",
									context: "column",
									title: "Mobile",
									autoSelect: true,
									toolTip: {
										da: "",
										en: ""
									}
								},
								meta: {
									type: "radio",
									name: "meta",
									context: "column",
									title: "Meta",
									toolTip: {
										da: "",
										en: ""
									}
								},
								lightbox: {
									type: "checkbox",
									name: "lightbox",
									title: "Lightbox",
									toolTip: {
										da: "",
										en: ""
									}
								},
								brocure: {
									type: "radio",
									context: "row",
									name: "brocure",
									group: "document",
									toolTip: {
										da: "",
										en: ""
									}
								},
								guide: {
									type: "radio",
									context: "row",
									name: "guide",
									group: "document",
									toolTip: {
										da: "",
										en: ""
									}
								}
							}
						},
						dragText: {
							type: "object",
							value: {
								en: "Drag and drop the row to reorder",
								da: "Slip for at re-arrangere rækkefølge"
							}
						},
						dropText: {
							type: "object",
							value: {
								en: "Drag-and-drop your images here <br /><small>jpg, jpeg, gif or png</small>",
								da: "Træk-og-slip dine billeder her<br /><small>jpg, jpeg, gif, eller png</small>"
							}
						},
						progressUploadText: {
							type: "object",
							value: {
								da: "Overfører fil(er)...",
								en: "Uploading file(s)..."
							}
						},
						progressDoneText: {
							type: "object",
							value: {
								da: "Transaktion færdig!",
								en: "Transaction done!"
							}
						},
						progressCheckText: {
							type: "object",
							value: {
								da: "Undersøger fil(er)",
								en: "Checking file(s)"
							}
						},
						progressCheckDoneText: {
							type: "object",
							value: {
								da: "Færdig med at undersøge filer",
								en: "Done checking files"
							}
						},
						progressFailText: {
							type: "object",
							value: {
								da: "Fejl under overførsel",
								en: "Error in uploading"
							}
						},
						confirmRemoveRowText: {
							type: "object",
							value: {
								da: "Ønsker du virkelig at fjerne denne række?",
								en: "Do you really wish to remove this row?"
							}
						},
						confirmRemoveRowsText: {
							type: "object",
							value: {
								da: "Ønsker du virkelig at fjerne de valgte rækker?",
								en: "Do you really wish to remove the selected rows?"
							}
						},
						itemCreateTitle: {
							type: "object",
							value: {
								da: "Tilføj nyt emne",
								en: "Add new item"
							}
						},
						itemEditTitle: {
							type: "object",
							value: {
								da: "Rediger",
								en: "Edit"
							}
						},
						itemCreateText: {
							type: "object",
							value: {
								da: "Tilføj",
								en: "Add"
							}
						},
						itemEditText: {
							type: "object",
							value: {
								da: "Rediger",
								en: "Edit"
							}
						},
						itemRemoveText: {
							type: "object",
							value: {
								da: "Fjern",
								en: "Remove"
							}
						},
						ignoreStaticDir: {
							type: "boolean",
							value: true
						},
						parentEntity: {
							type: "varchar"
						},
						parentEnumType: {
							type: "varchar"
						},
						childEntity: {
							type: "varchar"
						},
						childEnumType: {
							type: "varchar"
						}
					}
				},
				call2action: {
					id: 7,
					title: "",
					type: "call2action",
					properties: {
						type: {
							type: "varchar",
							value: "call2action"
						},
						uitype: {
							type: "varchar",
							value: "call2action"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.call2action.Call2Action"
						},
						value: {
							type: "varchar"
						}
					}
				},
				colorpicker: {
					id: 8,
					title: "",
					type: "colorpicker",
					properties: {
						type: {
							value: "colorpicker",
							type: "varchar"
						},
						uitype: {
							type: "varchar",
							value: "hsvwheelfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.hsvwheel.Field"
						},
						vtype: {
							type: "varchar"
						}
					}
				},
				picker: {
					id: 9,
					title: "",
					type: "picker",
					properties: {
						type: {
							type: "varchar",
							value: "picker"
						},
						uitype: {
							type: "varchar",
							value: "combobox"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.ComboBox"
						},
						values: {
							type: "array"
						},
						enum: {
							type: "varchar",
							value: ""
						},
						valueField: {
							type: "varchar",
							value: "key"
						},
						displayField: {
							type: "varchar",
							value: "name"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						allowClear: {
							type: "boolean",
							value: false
						},
						vtype: {
							type: "varchar"
						},
						preselect: {
							type: "boolean",
							value: false
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						}
					}
				},
				thumbnailpicker: {
					id: 10,
					title: "",
					type: "thumbnailpicker",
					properties: {
						type: {
							type: "varchar",
							value: "thumbnailpicker"
						},
						uitype: {
							type: "varchar",
							value: "thumbnailcombobox"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.ThumbnailComboBox"
						},
						path: {
							type: "varchar"
						},
						enum: {
							type: "varchar",
							value: ""
						},
						extension: {
							type: "varchar",
							value: "png"
						},
						valueField: {
							type: "varchar",
							value: "key"
						},
						displayField: {
							type: "varchar",
							value: "name"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						vtype: {
							type: "varchar"
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						}
					}
				},
				uploadpicker: {
					id: 11,
					title: "",
					type: "uploadpicker",
					properties: {
						type: {
							type: "varchar",
							value: "uploadpicker"
						},
						uitype: {
							type: "varchar",
							value: "uploadpicker"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.UploadPicker"
						},
						path: {
							type: "varchar",
							value: ""
						},
						pageSize: {
							type: "integer",
							value: 20
						},
						extensions: {
							type: "array",
							value: "jpg,jpeg,gif,png"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						vtype: {
							type: "varchar"
						},
						ignoreStaticDir: {
							type: "boolean",
							value: true
						},
						crop: {
							type: "boolean",
							value: false
						},
						convertFromPdf: {
							type: "boolean",
							value: false
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						}
					}
				},
				uploadpickerrelation: {
					id: 12,
					title: "",
					type: "uploadpickerrelation",
					properties: {
						type: {
							type: "varchar",
							value: "uploadpickerrelation"
						},
						uitype: {
							type: "varchar",
							value: "uploadpickerrelation"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.UploadPickerRelation"
						},
						path: {
							type: "varchar",
							value: ""
						},
						extensions: {
							type: "array",
							value: [
								"*"
							]
						},
						pageSize: {
							type: "integer",
							value: 20
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						vtype: {
							type: "varchar"
						},
						parentEntity: {
							type: "varchar"
						},
						parentEnumType: {
							type: "varchar"
						},
						childEntity: {
							type: "varchar"
						},
						childEnumType: {
							type: "varchar"
						},
						submitRaw: {
							type: "boolean"
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						}
					}
				},
				markdowneditor: {
					id: 13,
					title: "",
					type: "markdowneditor",
					addFields: [
						{
							type: "textarea",
							name: "<% name %>",
							sanitizeFn: "ip2.markdownToHtml",
							conditionFn: "ip2.trueFn",
							borrow: "<% data.markdownFieldName || data.name + '_markdown' %>",
							hidden: true,
							translate: false
						}
					],
					properties: {
						type: {
							type: "varchar",
							value: "markdowneditor"
						},
						proxyName: {
							type: "varchar",
							apply: {
								proxyName: "<% data.name %>"
							}
						},
						name: {
							type: "varchar",
							apply: {
								name: "<% data.markdownFieldName || data.name + '_markdown' %>"
							}
						},
						markdownFieldName: {
							type: "varchar",
							value: "",
							apply: {
								markdownFieldName: "<% data.markdownFieldName || data.name + '_markdown' %>"
							}
						},
						uitype: {
							type: "varchar",
							value: "markdownfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.markdown.Field"
						},
						actions: {
							type: "array",
							value: [
								"h3",
								"bold",
								"italic",
								"link",
								"quote",
								"image",
								"olist",
								"ulist",
								"hr"
							]
						},
						output: {
							type: "varchar",
							value: "html"
						},
						textareaConfig: {
							type: "object",
							value: {
								rows: 20,
								grow: true,
								growMax: 300
							}
						},
						vtype: {
							type: "varchar"
						}
					}
				},
				i18ntextfield: {
					id: 14,
					title: "",
					type: "i18ntextfield",
					properties: {
						type: {
							type: "varchar",
							value: "i18ntextfield"
						},
						uitype: {
							type: "varchar",
							value: "i18ntextfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.i18n.Text"
						},
						vtype: {
							type: "varchar"
						},
						vtypeText: {
							type: "varchar",
							alias: [
								"errorMessage"
							]
						},
						enforceMaxLength: {
							type: "boolean",
							value: false
						},
						fieldBodyCls: {
							type: "varchar",
							value: "ux-i18n-field"
						},
						fieldCssFile: {
							type: "varchar",
							value: "ux/form/field/i18n/_css/field.css"
						},
						iconCssFile: {
							type: "varchar",
							value: "ux/form/field/i18n/_css/icons.css"
						},
						iconClassName: {
							type: "varchar",
							value: "AIL-flags"
						},
						iconFieldStyle: {
							type: "varchar",
							value: "background-position-x: 4px; padding-left: 28px;"
						},
						iconFieldCls: {
							type: "varchar",
							value: "AIL-icon AIL-icon-18 icon-flag_"
						},
						languages: {
							type: "array",
							value: []
						},
						defaultLanguage: {
							type: "varchar",
							value: ""
						},
						forceJSON: {
							type: "boolean",
							value: false
						},
						preventI18nTrigger: {
							type: "boolean",
							value: false
						},
						asString: {
							type: "boolean",
							value: false
						},
						seoValidation: {
							type: "object"
						}
					}
				},
				includepicker: {
					id: 15,
					type: "includepicker",
					title: "",
					properties: {
						type: {
							type: "varchar",
							value: "includepicker"
						},
						uitype: {
							type: "varchar",
							value: "includecombobox"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.IncludeComboBox"
						},
						dmd: {
							type: "varchar",
							value: "webshop.dmd"
						},
						entity: {
							type: "varchar",
							value: "WSHSITET00"
						},
						view: {
							type: "varchar",
							value: "portfolio"
						},
						includeLabel: {
							type: "varchar"
						},
						excludeLabel: {
							type: "varchar"
						},
						allLabel: {
							type: "varchar"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						}
					}
				},
				xpd: {
					id: 16,
					title: "",
					type: "xpd",
					properties: {
						type: {
							type: "varchar",
							value: "xpd"
						},
						uitype: {
							type: "varchar",
							value: "xpdfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.xpd.Field"
						},
						xpd: {
							type: "varchar"
						},
						language: {
							type: "varchar",
							value: "en"
						}
					}
				},
				textarea: {
					id: 17,
					title: "",
					type: "textarea",
					properties: {
						type: {
							type: "varchar",
							value: "textarea"
						},
						uitype: {
							type: "varchar",
							value: "textareafield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.TextArea"
						},
						stripCharsRe: {
							type: "varchar"
						},
						rows: {
							type: "number"
						},
						cols: {
							type: "number"
						},
						vtype: {
							type: "varchar"
						}
					}
				},
				htmleditor: {
					id: 18,
					title: "",
					type: "htmleditor",
					properties: {
						type: {
							type: "varchar",
							value: "htmleditor"
						},
						uitype: {
							type: "varchar",
							value: "htmleditor"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.HtmlEditor"
						},
						enableAlignments: {
							type: "boolean",
							value: true
						},
						enableColors: {
							type: "boolean",
							value: true
						},
						enableFont: {
							type: "boolean",
							value: true
						},
						enableFontSize: {
							type: "boolean",
							value: true
						},
						enableFormat: {
							type: "boolean",
							value: true
						},
						enableLinks: {
							type: "boolean",
							value: true
						},
						enableLists: {
							type: "boolean",
							value: true
						},
						enableSourceEdit: {
							type: "boolean",
							value: true
						}
					}
				},
				acetextarea: {
					id: 19,
					title: "",
					type: "acetextarea",
					properties: {
						type: {
							type: "varchar",
							value: "acetextarea"
						},
						uitype: {
							type: "varchar",
							value: "acetextarea"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.AceTextArea"
						},
						theme: {
							type: "varchar",
							value: "textmate"
						},
						mode: {
							type: "varchar",
							value: "text"
						},
						useWorker: {
							type: "boolean",
							value: true
						},
						showPrintMargin: {
							type: "boolean",
							value: false
						},
						wrap: {
							type: "integer",
							value: 0
						},
						asJson: {
							type: "boolean",
							value: false
						},
						asArray: {
							type: "boolean",
							value: false
						}
					}
				},
				ip2BasketItems: {
					id: 20,
					title: "",
					type: "ip2BasketItems",
					properties: {
						type: {
							type: "varchar",
							value: "ip2BasketItems"
						},
						uitype: {
							type: "varchar",
							value: "ip2basketitems"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.BasketItems"
						}
					}
				},
				isotimestamp: {
					id: 21,
					title: "",
					type: "isotimestamp",
					properties: {
						type: {
							type: "varchar",
							value: "isotimestamp"
						},
						uitype: {
							type: "varchar",
							value: "isotimestamp"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.ISOTimestampField"
						},
						native: {
							type: "boolean",
							value: false
						},
						date: {
							type: "boolean",
							value: true
						},
						time: {
							type: "boolean",
							value: true
						},
						seconds: {
							type: "boolean",
							value: true
						},
						micro: {
							type: "boolean",
							value: false
						},
						dateformat: {
							type: "varchar",
							value: "Y-m-d-h.i.s.u"
						}
					}
				},
				xpditemgrid: {
					id: 22,
					title: "",
					type: "xpditemgrid",
					properties: {
						type: {
							type: "varchar",
							value: "xpditemgrid"
						},
						uitype: {
							type: "varchar",
							value: "xpditemgrid"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.XidItemGrid"
						},
						xpd: {
							type: "varchar"
						},
						map: {
							type: "object"
						}
					}
				},
				serppreviewfield: {
					id: 32,
					title: "",
					type: "serppreviewfield",
					properties: {
						type: {
							type: "varchar",
							value: "serppreviewfield"
						},
						uitype: {
							type: "varchar",
							value: "serppreviewfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.serppreview.FieldContainer"
						},
						titleField: {
							type: "varchar",
							value: "metatitle"
						},
						urlField: {
							type: "varchar",
							value: "seourl"
						},
						descriptionField: {
							type: "varchar",
							value: "metadescription"
						},
						keywordsField: {
							type: "varchar",
							value: "keywords"
						}
					}
				},
				i18ntextareafield: {
					id: 31,
					title: "",
					type: "i18ntextareafield",
					properties: {
						type: {
							type: "varchar",
							value: "i18ntextareafield"
						},
						uitype: {
							type: "varchar",
							value: "i18ntextareafield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.i18n.TextArea"
						},
						asString: {
							type: "boolean",
							value: false
						}
					}
				},
				isotimestamppresave: {
					id: 30,
					title: "",
					type: "isotimestamppresave",
					properties: {
						type: {
							type: "varchar",
							value: "isotimestamppresave"
						},
						uitype: {
							type: "varchar",
							value: "isotimestamppresavefield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.ISOTimestampPreSaveField"
						},
						native: {
							type: "boolean",
							value: false
						},
						date: {
							type: "boolean",
							value: true
						},
						time: {
							type: "boolean",
							value: true
						},
						seconds: {
							type: "boolean",
							value: true
						},
						micro: {
							type: "boolean",
							value: false
						},
						dateformat: {
							type: "varchar",
							value: "Y-m-d-h.i.s.u"
						}
					}
				},
				htmlfield: {
					id: 27,
					title: "",
					type: "htmlfield",
					properties: {
						type: {
							type: "varchar",
							value: "htmlfield"
						},
						uitype: {
							type: "varchar",
							value: "htmlfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.Html"
						}
					}
				},
				fieldcombi: {
					id: 28,
					title: "",
					type: "fieldcombi",
					properties: {
						type: {
							type: "varchar",
							value: "fieldcombi"
						},
						uitype: {
							type: "varchar",
							value: "fieldcombi"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.Combi"
						},
						fields: {
							type: "array",
							value: []
						}
					}
				},
				preposttextfield: {
					id: 33,
					title: "",
					type: "preposttextfield",
					properties: {
						type: {
							type: "varchar",
							value: "preposttextfield"
						},
						uitype: {
							type: "varchar",
							value: "preposttextfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.PrePostTextField"
						},
						preConfig: {
							type: "object"
						},
						postConfig: {
							type: "object"
						}
					}
				},
				i18ntextmarkdownfield: {
					id: 34,
					title: "",
					type: "i18ntextmarkdownfield",
					properties: {
						type: {
							type: "varchar",
							value: "i18ntextmarkdownfield"
						},
						uitype: {
							type: "varchar",
							value: "i18ntextmarkdownfield"
						},
						uiclass: {
							type: "varchar",
							value: "Portfolio.ux.form.field.i18n.text.MarkdownField"
						},
						asString: {
							type: "boolean",
							value: false
						}
					}
				},
				enum: {
					id: 35,
					title: "",
					type: "picker",
					properties: {
						type: {
							type: "varchar",
							value: "picker"
						},
						enum: {
							type: "varchar",
							value: ""
						},
						uitype: {
							type: "varchar",
							value: "combobox"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.form.field.ComboBox"
						},
						values: {
							type: "array"
						},
						valueField: {
							type: "varchar",
							value: "key"
						},
						displayField: {
							type: "varchar",
							value: "name"
						},
						multiSelect: {
							type: "boolean"
						},
						editable: {
							type: "boolean",
							value: false
						},
						forceSelection: {
							type: "boolean",
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						preprocess: {
							type: "array",
							value: [
								{
									regexp: "^",
									replace: "webr~design~"
								}
							]
						},
						postprocess: {
							type: "array",
							value: [
								{
									search: "webr~design~",
									replace: ""
								}
							]
						}
					}
				},
				gridpicker: {
					id: 39,
					title: "",
					type: "gridpicker",
					properties: {
						type: {
							type: "varchar",
							value: "gridpicker"
						},
						uitype: {
							type: "varchar",
							value: "combobox"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.Gridpicker"
						},
						values: {
							type: "array"
						},
						valueField: {
							type: "varchar",
							value: "key"
						},
						displayField: {
							type: "varchar",
							value: "name"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						allowClear: {
							type: "boolean",
							value: false
						},
						vtype: {
							type: "varchar"
						},
						preselect: {
							type: "boolean",
							value: false
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						}
					}
				},
				isotimestampdisplay: {
					id: 40,
					title: "",
					type: "isotimestampdisplay",
					properties: {
						type: {
							type: "varchar",
							value: "isotimestampdisplay"
						},
						uitype: {
							type: "varchar",
							value: "isotimestampdisplayfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.ISOTimestampDisplayfield"
						},
						native: {
							type: "boolean",
							value: false
						},
						date: {
							type: "boolean",
							value: true
						},
						time: {
							type: "boolean",
							value: true
						},
						seconds: {
							type: "boolean",
							value: true
						},
						micro: {
							type: "boolean",
							value: false
						},
						dateformat: {
							type: "varchar",
							value: "Y-m-d-h.i.s.u"
						}
					}
				},
				collectionpicker: {
					id: 41,
					title: "",
					type: "collectionpicker",
					properties: {
						type: {
							type: "varchar",
							value: "collectionpicker"
						},
						uitype: {
							type: "varchar",
							value: "combobox"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.CollectionPicker"
						},
						values: {
							type: "array"
						},
						valueField: {
							type: "varchar",
							value: "key"
						},
						displayField: {
							type: "varchar",
							value: "value"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: false
						},
						forceSelection: {
							type: "boolean",
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						xpd: {
							type: "varchar",
							value: ""
						}
					}
				},
				languagepicker: {
					id: 42,
					title: "Language picker, select a record from the language entity (NAVLNG)",
					type: "languagepicker",
					properties: {
						type: {
							type: "varchar",
							value: "languagepicker"
						},
						uitype: {
							type: "varchar",
							value: "languagepicker"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.LanguageComboBox"
						},
						dmd: {
							type: "varchar",
							value: "dmd/portfolio.dmd"
						},
						entity: {
							type: "varchar",
							value: "NAVLNG"
						},
						extraParams: {
							type: "object",
							__api__: {
								filter: ""
							}
						},
						pageSize: {
							type: "integer",
							value: 20
						},
						view: {
							type: "varchar",
							value: "portfolio"
						},
						value: {
							type: "integer",
							value: ""
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							alias: [
								"typeahead"
							]
						},
						vtype: {
							type: "varchar"
						}
					}
				},
				iconpicker: {
					id: 43,
					title: "",
					type: "iconpicker",
					properties: {
						type: {
							type: "varchar",
							value: "iconpicker"
						},
						uitype: {
							type: "varchar",
							value: "textfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.IconPicker"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						pageSize: {
							type: "integer",
							value: 20
						},
						editable: {
							type: "boolean",
							value: false
						}
					}
				},
				i18nhook: {
					id: 44,
					title: "",
					type: "i18nhook",
					properties: {
						type: {
							type: "varchar",
							value: "i18nhook"
						},
						uitype: {
							type: "varchar",
							value: "i18nhooktextfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.i18nHook.Text"
						},
						vtype: {
							type: "varchar"
						},
						vtypeText: {
							type: "varchar",
							alias: [
								"errorMessage"
							]
						},
						enforceMaxLength: {
							type: "boolean",
							value: false
						},
						fieldBodyCls: {
							type: "varchar",
							value: "ux-i18n-field"
						},
						fieldCssFile: {
							type: "varchar",
							value: "ux/form/field/i18n/_css/field.css"
						},
						iconCssFile: {
							type: "varchar",
							value: "ux/form/field/i18n/_css/icons.css"
						},
						iconClassName: {
							type: "varchar",
							value: "AIL-flags"
						},
						iconFieldStyle: {
							type: "varchar",
							value: "background-position-x: 4px; padding-left: 28px;"
						},
						iconFieldCls: {
							type: "varchar",
							value: "AIL-icon AIL-icon-18 icon-flag_"
						},
						languages: {
							type: "array",
							value: []
						},
						defaultLanguage: {
							type: "varchar",
							value: ""
						},
						forceJSON: {
							type: "boolean",
							value: false
						},
						preventI18nTrigger: {
							type: "boolean",
							value: false
						},
						defaultProperty: {
							type: "varchar",
							value: ""
						},
						hook: {
							type: "varchar",
							value: ""
						}
					}
				},
				sqlcombobox: {
					id: 45,
					title: "",
					type: "sqlcombobox",
					properties: {
						type: {
							type: "varchar",
							value: "sqlcombobox"
						},
						uitype: {
							type: "varchar",
							value: "combosql"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.ComboSql"
						},
						url: {
							type: "varchar",
							value: "/"
						},
						displayField: {
							type: "varchar",
							value: "key"
						},
						valueField: {
							type: "varchar",
							value: "value"
						},
						valueColumn: {
							type: "varchar",
							value: ""
						},
						rootProperty: {
							type: "varchar",
							value: "rows"
						},
						totalProperty: {
							type: "varchar",
							value: "totalRows"
						},
						actionMethods: {
							type: "object",
							value: {}
						},
						schema: {
							type: "varchar",
							value: ""
						},
						table: {
							type: "varchar",
							value: ""
						},
						where: {
							type: "varchar",
							value: ""
						},
						action: {
							type: "varhcar",
							value: ""
						},
						cte: {
							type: "boolean",
							value: false
						},
						columns: {
							type: "array",
							value: []
						},
						params: {
							type: "object",
							value: {}
						}
					}
				},
				fileeditorfield: {
					id: 46,
					title: "",
					type: "fileeditorfield",
					properties: {
						type: {
							type: "varchar",
							value: "fileeditorfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.FileEditor"
						},
						fileExtension: {
							type: "array",
							value: [{
								ext: "*",
								desc: "All Files (*.*)"
							}]
						}
					}
				},
				registrationfield: {
					id: 47,
					title: "",
					type: "registrationfield",
					properties: {
						type: {
							type: "varchar",
							value: "registrationfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.Registration"
						}
					}
				},
				comboobjecttype: {
					id: 48,
					title: "",
					type: "comboobjecttype",
					properties: {
						type: {
							type: "varchar",
							value: "comboobjecttype"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.ComboObjectType"
						},
						url: {
							type: "varchar",
							value: ""
						},
						keyField: {
							type: "varchar",
							value: "key"
						},
						valueField: {
							type: "varchar",
							value: "value"
						},
						options: {
							type: "object",
							value: null
						}
					}
				},
				restentitypicker: {
					id: 49,
					title: "Rest Entity picker, select a entity from a DMD",
					type: "restentitypicker",
					properties: {
						type: {
							type: "varchar",
							value: "restentitypicker"
						},
						uitype: {
							type: "varchar",
							value: "restentitypicker"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.RestEntityPicker"
						},
						dmd: {
							title: "The DMD file to read from",
							type: "varchar",
							value: ""
						},
						entity: {
							title: "The name of the Entity",
							type: "varchar",
							value: ""
						},
						allowAdd: {
							ype: "boolean",
							value: false
						},
						url: {
							type: "varchar",
							value: "/api"
						},
						limitParam: {
							type: "varchar",
							value: "limit"
						},
						queryParam: {
							type: "varchar",
							value: "search"
						},
						rootProperty: {
							type: "varchar",
							value: "rows"
						},
						totalProperty: {
							type: "varchar",
							value: "totalElements"
						},
						pageSize: {
							type: "integer",
							value: 20
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						typeAhead: {
							type: "boolean",
							alias: [
								"typeahead"
							]
						},
						valueField: {
							type: "varchar",
							value: ""
						},
						forceSelection: {
							type: "boolean",
							value: false
						},
						asObject: {
							type: "boolean",
							value: false
						}
					}
				},
				"i18n-hook-textfield": {
					id: 50,
					title: "",
					type: "i18n-hook-textfield",
					properties: {
						type: {
							type: "varchar",
							value: "i18n-hook-textfield"
						},
						uitype: {
							type: "varchar",
							value: "i18n-hook-textfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.i18n.hook.TextField"
						},
						languages: {
							type: "array"
						},
						defaultProperty: {
							type: "varchar",
							value: ""
						},
						hook: {
							type: "varchar",
							value: ""
						}
					}
				},
				"i18n-hook-textarea": {
					id: 51,
					title: "",
					type: "i18n-hook-textarea",
					properties: {
						type: {
							type: "varchar",
							value: "i18n-hook-textarea"
						},
						uitype: {
							type: "varchar",
							value: "i18n-hook-textarea"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.i18n.hook.TextArea"
						},
						languages: {
							type: "array"
						},
						defaultProperty: {
							type: "varchar",
							value: ""
						},
						hook: {
							type: "varchar",
							value: ""
						}
					}
				},
				bindingfield: {
					id: 52,
					title: "",
					type: "bindingfield",
					properties: {
						type: {
							type: "varchar",
							value: "bindingfield"
						},
						uitype: {
							type: "varchar",
							value: "bindingfield"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.BindingField"
						},
						alt: {
							type: "boolean"
						},
						ctrl: {
							type: "boolean"
						},
						shift: {
							type: "boolean"
						}
					}
				},
				downloadpicker: {
					id: 53,
					title: "",
					type: "downloadpicker",
					properties: {
						type: {
							type: "varchar",
							value: "downloadpicker"
						},
						uitype: {
							type: "varchar",
							value: "downloadpicker"
						},
						uiclass: {
							type: "varchar",
							value: "Ext.ux.form.field.DownloadPicker"
						},
						path: {
							type: "varchar"
						},
						pageSize: {
							type: "integer",
							value: 20
						},
						extensions: {
							type: "array",
							value: "*"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							value: false,
							alias: [
								"forceselection"
							]
						},
						typeAhead: {
							type: "boolean",
							value: false,
							alias: [
								"typeahead"
							]
						},
						vtype: {
							type: "varchar"
						},
						ignoreStaticDir: {
							type: "boolean",
							value: true
						},
						fieldParams: {
							type: "array",
							value: []
						},
						filterBy: {
							type: "object"
						}
					}
				},
				"pd-picker": {
					id: 54,
					title: "",
					type: "pd-picker",
					properties: {
						type: {
							type: "varchar",
							value: "pd-picker"
						},
						uitype: {
							type: "varchar",
							value: "combobox"
						},
						uiclass: {
							type: "varchar",
							value: "Portfolio.ux.form.field.pd.Picker"
						},
						url: {
							type: "varchar"
						},
						value: {
							type: "varchar"
						},
						valueField: {
							type: "varchar",
							value: "id"
						},
						displayField: {
							type: "varchar",
							value: "title"
						},
						multiSelect: {
							type: "boolean",
							value: false
						},
						editable: {
							type: "boolean",
							value: true
						},
						forceSelection: {
							type: "boolean",
							alias: [
								"forceselection"
							],
							value: false
						},
						typeAhead: {
							type: "boolean",
							value: true,
							alias: [
								"typeahead"
							]
						},
						isFormField: {
							type: "boolean",
							value: false
						}
					}
				},
			},
			uitype: {
				preprocess: function (o_config, o_rule) {

					return o_config;
				},
				postprocess: function (i_cmp, o_fields, o_xpd) {

					i_cmp.on("focus", function () {
						if (i_cmp.clearInvalid) {
							i_cmp.clearInvalid();
						}
					});

					return i_cmp;
				},
				collections: {
					ip2BasketItems: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					isotimestamp: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					isotimestampdisplay: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					iconpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					collectionpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					languagepicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					isotimestamppresave: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					htmlfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					fieldcombi: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								i_cmp.on({
									afterrender: {
										fn: function (i_container) {

											var a_fields = [];
											var n_seq = 0;

											Ext.Array.each(i_container.fields, function (o_config) {

												var i_field = o_fields[o_config.name];

												if (i_field) {

													Ext.apply(i_field, {
														inFieldCombi: true
													});

													i_field.setFieldLabel(o_config.fieldLabel);
													i_field.setWidth(o_config.width);
													i_field.setFlex(o_config.flex);
													i_field.setMinWidth(o_config.minWidth);
													i_field.labelWidth = o_config.labelWidth;

													delete i_field._xpdConfig.groups;

													a_fields.push(i_field);

													if (i_field.sequence) {
														if (i_field.sequence > n_seq) {
															n_seq = i_field.sequence;
														}
													}
												}
											});

											i_container.fieldcount = a_fields.length;

											if (a_fields.length > 0) {

												var i_last = a_fields[a_fields.length - 1];

												i_last.setMargin("0 0 0 0");
												Ext.suspendLayouts();
												i_container.add(a_fields);
												Ext.resumeLayouts(true);
												i_container.sequence = n_seq;
											}
										},
										buffer: 100
									}
								});

								return i_cmp;
							}
						}
					},
					fieldfilemanager: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					FileImg: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					FileRel: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					decimalnumber: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					xpditemgrid: {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					serppreviewfield: {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					acetextarea: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					htmleditor: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					varchar: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					string: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					textarea: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					int: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					number: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					numeric: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					boolean: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								if (o_config.inputValue == o_config.value) {
									o_config.checked = true;
								}

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					enum: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config) {

								var S_ENUM_FILE = "adm.ns";
								// Setup value/display keys for store
								var s_valueKey = o_config.valueField || "key";
								var s_displayKey = o_config.displayField || "name";

								// If no store has been defined - setup one
								if (!o_config.store) {
									o_config.store = {
										fields: [
											{ name: s_valueKey, type: "auto" },
											{ name: s_displayKey, type: "string" }
										],
										proxy: {
											type: "memory"
										}
									};
								}

								// Supply the store with ENUM data
								o_config.store.data = (function () {

									// Get the enum resource and create the enum instance
									var o_enum = ip2.resource.get(S_ENUM_FILE);
									var i_enum = new ip2.DynamicNS(o_enum);

									// Prepare data array and get the enum keys ready to iterate over
									var a_data = [];
									var a_keys = i_enum.getEnumLayoutKeys(o_config.enum);

									// Language is used in bottom of iteration when the "record" is made
									// to get the right view value out
									var s_language = ip2.session.getLanguage();

									// Iterate the enum keys to build the store data array
									Ext.Array.each(a_keys, function (s_key) {

										var o_value = i_enum.getEnumValue(s_key);

										if (o_config._xpdConfig.postprocess) {

											// Post process the key to clean the value
											Ext.Array.each(o_config._xpdConfig.postprocess, function (ins) {

												if (ins.regexp) {
													s_key = s_key.replace(new RegExp(ins.regexp, "g"), ins.replace || "");
												}
												else if (ins.search) {
													s_key = s_key.replace(ins.search, ins.replace || "");
												}
											});
										}

										var o_dataValue = {};
										o_dataValue[s_valueKey] = s_key;
										o_dataValue[s_displayKey] = o_value[s_language] || o_value.en || o_value.da;
										a_data.push(o_dataValue);
									});
									a_data.sort(function (a, b) {

										var s_keyA = a[s_valueKey] || 0;
										var s_keyB = b[s_valueKey] || 0;

										if (Ext.isNumber(parseFloat(s_keyA)) && Ext.isNumber(parseFloat(s_keyA))) {
											return parseFloat(s_keyA) > parseFloat(s_keyB);
										}
										else {

											s_keyA = a[s_displayKey];
											s_keyB = b[s_displayKey];

											return s_keyA.toLowerCase() > s_keyB.toLowerCase();
										}
									});

									return a_data;
								})();

								if (!o_config.queryMode) {
									o_config.queryMode = "local";
								}

								// Enums are forceSelection true by default
								// unless creation is allowed
								if (o_config.allowCreate) {
									o_config.forceSelection = false;
								}
								else {
									o_config.forceSelection = true;
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					date: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								if (value) {
									var s_format = Ext.util.Format.dateFormat || Ext.util.Format.defaultDateFormat;
									var f_render = Ext.util.Format.dateRenderer(s_format);
									var i_date = new Date(value);
									value = f_render(i_date);
								}
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								// Support minimum date as "today"
								if (o_config.minValue && o_config.minValue == "today") {
									var today = new Date();
									o_config.minValue = today;
								}

								// Support minimum date as "tomorrow"
								if (o_config.maxValue && o_config.maxValue == "tomorrow") {
									var tomorrow = new Date();
									tomorrow.setDate(tomorrow.getDate() + 1);
									o_config.maxValue = tomorrow;
								}

								o_config.getValue = function () {

									var i_cmp = this;
									var format = i_cmp.submitFormat || i_cmp.format;
									var rawValue = i_cmp.getRawValue();
									var value;

									value = i_cmp.rawToValue(i_cmp.processRawValue(rawValue));

									return value ? Ext.Date.format(value, format) : "";
								};

								o_config.submitFormat = o_config.submitFormat || "Y-m-d";
								o_config.format = o_config.format || Ext.util.Format.dateFormat || Ext.util.Format.defaultDateFormat;

								o_config.getSubmitValue = o_config.getValue;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								var o_config = i_cmp.initialConfig;
								var o_map;
								var i_bind;

								// Min Date bind
								if (o_config.minDateBind) {

									i_bind = o_fields[o_config.minDateBind];

									i_cmp._oldMinValue = o_config.minValue;

									i_bind.on("change", function () {

										var value = i_bind.getValue();
										var oldValue = i_cmp._oldMinValue;

										if (!value) {
											i_cmp.setMinValue(oldValue);
										}
										else if (value != oldValue) {
											i_cmp.setMinValue(value);
										}
									});
								}

								// Max Date bind
								if (o_config.maxDateBind) {

									i_bind = o_fields[o_config.maxDateBind];

									i_cmp._oldMaxValue = o_config.maxValue;

									i_bind.on("change", function () {

										var value = i_bind.getValue();
										var oldValue = i_cmp._oldMaxValue;

										if (!value) {
											i_cmp.setMaxValue(oldValue);
										}
										else if (value != oldValue) {
											i_cmp.setMaxValue(value);
										}
									});
								}

								return i_cmp;
							}
						}
					},
					entitypicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					entitycreatorpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					restentitypicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					gridpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config) {

								var S_ENUM_FILE = "adm.ns";

								// Setup value/display keys for store
								var s_valueKey = o_config.valueField || "value";
								var s_displayKey = o_config.displayField || "key";
								var s_group = o_config.group || "group";

								// If no store has been defined - setup one
								if (!o_config.store) {
									o_config.store = {
										groupField: s_group,
										fields: [
											{ name: s_valueKey, type: "string" },
											{ name: s_displayKey, type: "string" },
											{ name: s_group, type: "string" }
										],
										proxy: {
											type: "memory"
										}
									};
								}

								// Supply the store with ENUM data
								o_config.store.data = (function () {

									// Get the enum resource and create the enum instance
									var o_enum = ip2.resource.get(S_ENUM_FILE);
									var i_enum = new ip2.DynamicNS(o_enum);

									// Prepare data array and get the enum keys ready to iterate over
									var a_data = [];
									var a_keys = i_enum.getEnumLayoutKeys(o_config.values);

									// Language is used in bottom of iteration when the "record" is made
									// to get the right view value out
									var s_language = ip2.session.getLanguage();

									// Iterate the enum keys to build the store data array
									Ext.Array.each(a_keys, function (s_key) {

										var o_value = i_enum.getEnumValue(s_key);

										if (o_config._xpdConfig.postprocess) {

											// Post process the key to clean the value
											Ext.Array.each(o_config._xpdConfig.postprocess, function (ins) {

												if (ins.regexp) {
													s_key = s_key.replace(new RegExp(ins.regexp, "g"), ins.replace || "");
												}
												else if (ins.search) {
													s_key = s_key.replace(ins.search, ins.replace || "");
												}
											});
										}
										var o_dataValue = {};
										o_dataValue[s_valueKey] = s_key;
										o_dataValue[s_displayKey] = o_value[s_language] || o_value.en || o_value.da;
										o_dataValue[s_group] = o_value[s_group][s_language];

										a_data.push(o_dataValue);
									});

									return a_data;

								})();

								if (!o_config.queryMode) {
									o_config.queryMode = "local";
								}

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					mediagallery: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					mediagalleryrelation: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					call2action: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					colorpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					picker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {
								if (!o_config.store) {

									var s_keyId = o_config.valueField || "key";
									var s_valueId = o_config.displayField || "name";

									var a_values = Ext.Array.from(o_config.values);
									var a_data = [];

									Ext.Array.each(a_values, function (value) {
										if (Ext.isObject(value)) {
											a_data.push(value);
										}
										else {
											var o_data = {};

											o_data[s_keyId] = value;
											o_data[s_valueId] = value;

											a_data.push(o_data);
										}
									});

									o_config.store = {
										fields: [
											{ name: s_keyId, type: "auto" },
											{ name: s_valueId, type: "string" }
										],
										data: a_data
									};
								}

								Ext.apply(o_config, {
									queryMode: "local",
								});

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {
								var value = i_cmp.getValue();
								var i_store = i_cmp.getStore();
								var a_items = i_store.data.items;
								if (value && a_items.length > 0) {
									i_cmp.suspendCheckChange++;
									i_cmp.setValue(value);
									i_cmp.resetOriginalValue();
									i_cmp.suspendCheckChange--;
								}
								return i_cmp;
							}
						}
					},
					thumbnailpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					"pd-picker": {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					downloadpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					uploadpicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					uploadpickermanager: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					uploadpickerrelation: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					markdowneditor: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								if (!o_config.hasOwnProperty("output")) {
									o_config.output = "markdown";
								}

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								var s_name = i_cmp.proxyName;
								var i_proxy;

								if (s_name) {
									i_proxy = o_fields[s_name];
								}
								else {
									s_name = i_cmp.name.split("_")[0];
									i_proxy = o_fields[s_name];
								}

								if (!i_cmp.rendered) {
									i_cmp.on({
										afterrender: {
											fn: function(i_field) {

												i_proxy.mon(i_cmp, "change", function (i_field, value) {
													var i_simpleMDE = i_field.getSimpleMDE();
													i_proxy.setRawValue(i_simpleMDE.markdown(value));
												});
											}
										}
									});
								}
								else {
									i_proxy.mon(i_cmp, "change", function (i_field, value) {
										var i_simpleMDE = i_field.getSimpleMDE();
										i_proxy.setRawValue(i_simpleMDE.markdown(value));
									});
								}


								return i_cmp;
							}
						}
					},
					includepicker: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					i18n: {
						grid: {
							preprocess: function (o_config, o_rule) {

								// GIT COMMENT FOR INCONSISTENCY

								var a_languages = wsh.getLanguages();
								var s_language = o_config.defaultLanguage || wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {

								var o_value = value;

								if (Ext.isString(value)) {

									o_value = Ext.decode(value, true) || value;
								}

								return ip2.i18n(o_value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								// GIT COMMENT FOR INCONSISTENCY

								var a_languages = wsh.getLanguages();
								var s_language = o_config.defaultLanguage || wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					i18ntextfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								// GIT COMMENT FOR INCONSISTENCY

								var a_languages = wsh.getLanguages();
								var s_language = o_config.defaultLanguage || wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {

								var o_value = value;

								if (Ext.isString(value)) {

									o_value = Ext.decode(value, true) || value;
								}

								return ip2.i18n(o_value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								// GIT COMMENT FOR INCONSISTENCY

								var a_languages = wsh.getLanguages();
								var s_language = o_config.defaultLanguage || wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					i18ntextareafield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}
								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp) {
								return i_cmp;
							},
							renderer: function (value) {
								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					i18ntextmarkdownfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}
								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp) {
								return i_cmp;
							},
							renderer: function (value) {
								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					i18nuploadpickerfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}
								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp) {
								return i_cmp;
							},
							renderer: function (value) {
								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					i18nuploadpickermanagerfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}
								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp) {
								return i_cmp;
							},
							renderer: function (value) {
								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								var a_languages = wsh.getLanguages();
								var s_language = wsh.i18n.getPrimary();

								if (!s_language) {
									s_language = "en";
								}

								if (!a_languages) {
									a_languages = ["en"];
								}

								o_config.defaultLanguage = s_language;
								o_config.languages = a_languages;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					i18nhook: {
						grid: {
							preprocess: function (o_config, o_rule) {

								// GIT COMMENT FOR INCONSISTENCY

								var s_language = wsh.i18n.getPrimary() || "en";

								var a_languages = o_config.languages || [];

								if (o_config.languages.length === 0) {
									o_config.languages = wsh.getLanguages();
								}

								o_config.defaultLanguage = s_language;

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {

								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								var s_language = wsh.i18n.getPrimary() || "en";

								var a_languages = o_config.languages || [];

								if (a_languages.length === 0) {
									o_config.languages = wsh.getLanguages();
								}

								o_config.defaultLanguage = s_language;

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {

								if (i_cmp.propertyHost) {
									i_cmp.setCarrierValue(i_record.get(i_cmp.propertyHost));
								}
								return i_cmp;
							}
						}
					},
					"i18n-hook-textfield": {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {

								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {

								if (i_cmp.propertyHost) {
									i_cmp.setCarrierValue(i_record.get(i_cmp.propertyHost));
								}
								return i_cmp;
							}
						}
					},
					"i18n-hook-textarea": {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {

								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {

								if (i_cmp.propertyHost) {
									i_cmp.setCarrierValue(i_record.get(i_cmp.propertyHost));
								}
								return i_cmp;
							}
						}
					},
					bindingfield: {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {
								return i_cmp;
							}
						}
					},
					"i18n-textfield": {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {

								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {
								return i_cmp;
							}
						}
					},
					"i18n-textarea": {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {

								return ip2.i18n(value);
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {

								return i_cmp;
							}
						}
					},
					preposttextfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					xpd: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					timestamp: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					sqlcombobox: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					fileeditorfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					registrationfield: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					comboobjecttype: {
						grid: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							},
							renderer: function (value) {
								return value;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, o_xpd) {

								return i_cmp;
							}
						}
					},
					clob: {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {
								return i_cmp;
							}
						}
					},
					blob: {
						grid: {
							preprocess: function (o_config, o_rule) {
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, o_rule) {

								return o_config;
							},
							postprocess: function (i_cmp, o_fields, i_record) {
								return i_cmp;
							}
						}
					}
				}
			},
			property: {
				preprocess: function (o_config, s_key, value, o_xpd, o_data) {

					switch (s_key) {
						case "vtypeText":
						case "fieldLabel":
						case "boxLabel":
						case "emptyText":

							// Try to translate value if possible
							value = ip2.i18n(value);

							if (ip2.isString(value) && o_xpd) {
								var s_language = ip2.session.getLanguage();
								value = ip2.xpd.translate(o_xpd, value, s_language);
							}

							o_config[s_key] = value;
							break;
						default: break;
					}

					return o_config;
				},
				postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

					return i_cmp;
				},
				collections: {
					preselect: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp, value, o_xpd, o_defaults, o_config) {

								if (!value) {
									return i_cmp;
								}

								i_cmp.on({
									added: {
										fn: function (i_field) {

											var i_store = i_field.getStore();
											var value = i_field.getValue();

											if (i_store.getCount() == 1 && !value) {

												var i_record = i_store.getAt(0);

												i_cmp.setValue(i_record.get(i_field.valueField));
											}
										},
										single: true
									}
								});

								return i_cmp;
							}
						}
					},
					uitype: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config.xtype = value;

								return o_config;
							}
						}
					},
					tooltip: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								var o_config = i_cmp._xpdConfig;
								var s_tooltip = ip2.i18n(o_config.tooltip);

								i_cmp.on({
									afterrender: {
										fn: function (item) {
											var i_tip = Ext.create("Ext.tip.ToolTip", {
												target: item.inputEl,
												html: s_tooltip,
												showDelay: 200,
												trackMouse: true
											});
											i_cmp._tooltip = i_tip;
										},
										single: true
									},
									destroy: {
										fn: function (item) {
											if (i_cmp._tooltip) {
												if (i_cmp._tooltip.destroy) {
													i_cmp._tooltip.destroy();
												}
											}
										}
									}
								});

								return i_cmp;
							}
						}
					},
					preview: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {
								if (o_config.preview.entity) {
									o_config.triggers = o_config.triggers || {};
									var n_trigger = Ext.Object.getKeys(o_config.triggers).length;
									var o_trigger = {
										cls: "x-ux-preview-trigger",
										weight: 1,
										scope: "this",
										tooltip: ip2.i18n({
											da: "Åben et preview",
											en: "Open a preview"
										}),
										handler: function (item) {
											var value = item.getValue();
											ip2.getSiteConfig(function (serversetting) {
												var s_src = o_config.preview.src;
												var s_host = serversetting.http_host;
												var b_multi = serversetting.language_usingmulti;
												var s_language = ip2.session.getLanguage();

												s_src = s_src.replace("{0}", s_host).replace("{2}", value);
												if (b_multi) {
													s_src = s_src.replace("{1}", s_language);
												}
												else {
													s_src = s_src.replace("{1}/", "");
												}

												var i_window = Ext.widget("previewwindow", {
													state: 0,
													animateTarget: item.id,
													title: ip2.i18n({
														da: "Preview ",
														en: "Preview "
													}) + ip2.i18n(o_config.preview.title),
													items: [
														{
															xtype: "ip2widget",
															layout: "fit",
															items: [
																{
																	xtype: "containeriframe",
																	src: s_src,
																	layout: "fit"
																}
															]
														}
													]
												});

												i_window.show();
											});
										}
									};

									o_config.triggers["preview-" + n_trigger] = o_trigger;
									o_config.preview_trigger = "preview-" + n_trigger;
								}
								return o_config;
							},
							postprocess: function (i_cmp) {
								var i_self = i_cmp;
								var o_config = i_self._xpdConfig;
								var s_preview_trigger = i_self.preview_trigger;
								if (o_config.preview.entity) {
									i_self.on({
										afterrender: {
											fn: function (item) {
												var value = i_self.getValue();
												var i_trigger = i_self.getTrigger(s_preview_trigger);
												if (!value) {
													i_trigger.hide();
												}
											},
											single: true
										},
										change: {
											fn: function (item, newValue) {
												if (i_self.triggerEl) {
													var i_trigger = i_self.getTrigger(s_preview_trigger);
													if (!newValue) {
														i_trigger.hide();
													}
													else {
														i_trigger.show();
													}
												}
											}
										}
									});
								}
								return i_self;
							}
						}
					},
					length: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {
								if (o_config.enforceMaxLength !== null) {
									o_config.maxLength = value;
									o_config.enforceMaxLength = true;
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					characterCount: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {
								var a_plugins = o_config.plugins || [];
								var o_plugin = {
									ptype: "charcount"
								};

								a_plugins.push(o_plugin);
								o_config.plugins = a_plugins;

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					anchor: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					allowClear: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								if (o_config.allowClear) {
									ip2.extend(o_config, {
										triggers: {
											clear: {
												cls: "x-form-clear-trigger",
												weight: 1,
												handler: "onTrigger1Click",
												scope: "this"
											},
											arrow: {
												cls: "x-form-arrow-trigger",
												weight: 1,
												handler: "onTriggerClick",
												scope: "this"
											}
										},
										onTrigger1Click: function () {

											var i_cmp = this;

											i_cmp.clearValue();

											return i_cmp;
										}
									});
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					"validator": {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {
								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, value, o_xpd) {
								o_config.validator = eval(o_config.validator);
								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						}
					},
					width: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								if (typeof value == "string") {
									o_config.anchor = value;
									delete o_config[s_key];
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					concat: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config.readOnly = true;

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								//"concat": ["width", "length"]
								//"concatWith": " x "
								var s_concatWith = i_cmp.concatWith;

								this.on({
									added: {
										fn: function (i_self) {

											Ext.Array.each(value, function (s_field) {

												var i_field = o_fields[s_field];

												i_field.on({
													change: {
														fn: function () {

															var a_value = [];

															Ext.Array.each(value, function (s_field) {

																var i_field = o_fields[s_field];
																var s_value;

																if (i_field["enum"]) {
																	s_value = i_field.getPrettyValue();
																}
																else {
																	s_value = i_field.getValue();
																}

																if (s_value) {
																	a_value.push(s_value);
																}
															});

															var s_value = a_value.join(s_concatWith);
															i_cmp.setValue(s_value);
														}
													}
												});
											});
										}
									}
								});

								return i_cmp;
							}
						}
					},
					from: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								if (o_config.dmdpath) {
									o_config[s_key] = {
										dmd: o_config.dmdpath,
										entity: o_config.entity,
										field: value
									};
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								i_cmp.on({
									added: {
										fn: function (i_self) {


											var i_parent = this;
											var i_dataParent;
											var i_record;

											while (i_parent && !i_parent.dataParent) {
												i_parent = i_parent.up();
											}

											if (i_parent) {
												i_dataParent = i_parent.dataParent;
												i_record = i_dataParent.getRecord();

												var s_field = value;

												// Normalize the value
												if (Ext.isObject(value)) {
													s_field = value.field;
												}

												if (i_record) {

													var o_fieldMap = i_record.getFieldsMap();

													if (!o_fieldMap.hasOwnProperty(s_field)) {
														return;
													}

													if (!i_parent.rendered) {

														i_parent.on({
															afterrender: {
																fn: function () {

																	var i_form = i_dataParent.getForm();
																	var i_fromfield = i_form.findField(s_field);
																	var val = i_record.get(s_field);


																	i_self.suspendCheckChange++;
																	i_self.setValue(val);
																	i_self.resetOriginalValue();
																	i_self.suspendCheckChange--;

																	i_fromfield.suspendCheckChange++;
																	i_fromfield.setValue(val);
																	i_fromfield.resetOriginalValue();
																	i_fromfield.suspendCheckChange--;

																	i_self.on({
																		change: {
																			fn: function (i_field) {

																				var value = i_self.getValue();

																				i_fromfield.setValue(value);

																			}
																		}
																	});

																},
																single: true
															}
														});
													}
													else {

														var i_form = i_dataParent.getForm();
														var i_fromfield = i_form.findField(s_field);
														var val = i_record.get(s_field);

														i_self.suspendCheckChange++;
														i_self.setValue(val);
														i_self.resetOriginalValue();
														i_self.suspendCheckChange--;

														i_fromfield.suspendCheckChange++;
														i_fromfield.setValue(val);
														i_fromfield.resetOriginalValue();
														i_fromfield.suspendCheckChange--;

														i_self.on({
															change: {
																fn: function (i_field) {

																	var value = i_self.getValue();
																	i_fromfield.setValue(value);
																}
															}
														});
													}
												}
											}
										},
										single: true,
										buffer: 10
									}
								});

								return i_cmp;
							}
						}
					},
					sanitizeFn: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config._sanitizeFn = function (s_value) {

									var i_cmp = this;

									var a_sanitize = i_cmp.sanitizeFn;
									var a_sanitizeArgs = i_cmp.sanitizeArgs || [];

									if (!ip2.isArray(a_sanitize) && a_sanitize) {
										a_sanitize = [a_sanitize];
										a_sanitizeArgs = [a_sanitizeArgs];
									}

									if (!a_sanitize) {
										return s_value;
									}

									for (var i = 0; i < a_sanitize.length; i++) {
										var f_sanitize = ip2.getProperty(a_sanitize[i]);
										var a_args = a_sanitizeArgs[i] || [];

										s_value = f_sanitize.apply(null, [s_value].concat(a_args));
									}

									return s_value;
								};

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								var a_sanitize = value;
								var a_sanitizeArgs = i_cmp.sanitizeArgs;

								i_cmp.on({
									change: {
										fn: function (i_self, newValue, oldValue) {
											i_cmp.suspendCheckChange++;
											var sanitized = i_cmp._sanitizeFn(newValue);
											i_self.setValue(sanitized);
											i_cmp.suspendCheckChange--
										}
									}
								});

								return i_cmp;
							}
						}
					},
					"filterBy": {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								var o_filterBy = value;

								var i_field = o_fields[o_filterBy.field];

								if (i_cmp.getStore) {
									if (i_field) {

										i_field.on({
											change: {
												fn: function (i_field, changed) {

													var i_store = i_cmp.getStore();
													var i_selected = i_field.getSelection();
													var value = i_field.getValue();

													var o_extraParms = i_store.extraParams || {
														filter: []
													};

													o_extraParms.filter = o_extraParms.filter || [];

													if (i_selected && i_selected.get) {

														if (o_filterBy.value) {
															value = i_selected.get(o_filterBy.value);
														}
													}

													var b_found = false;

													Ext.Array.each(o_extraParms.filter, function (o_filter) {
														if (o_filter.property == o_filterBy.property) {

															o_filter.value = value;
															b_found = true;
															return false;
														}
													});

													if (!b_found) {
														o_extraParms.filter.push({
															property: o_filterBy.property,
															value: value
														});
													}

													i_store.extraParams = o_extraParms;
												},
												buffer: 100
											}
										});
									}
								}



								return i_cmp;
							}
						}
					},
					borrow: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								var o_borrows = null;
								if (ip2.isObject(value)) {
									o_borrows = value;
								}
								else if (ip2.isArray(value)) {
									o_borrows = {
										fields: value
									};
								}
								else {
									o_borrows = {
										fields: [value]
									};
								}

								o_borrows.fields = Ext.Array.map(o_borrows.fields, function (o_borrow) {

									if (typeof o_borrow == "string") {
										o_borrow = {
											from: o_borrow,
											trigger: "blur"
										};
									}

									if (!o_borrow.conditionFn) {
										o_borrow.conditionFn = o_config.conditionFn;
									}

									if (o_config.sanitizeFn && !o_borrow.sanitizeFn) {
										o_borrow.sanitizeFn = o_config.sanitizeFn;
									}

									return o_borrow;
								});

								o_config.borrow = o_borrows;

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								var o_borrows = value;

								Ext.applyIf(o_borrows, {
									initialize : true,
								});

								Ext.Array.each(o_borrows.fields, function (o_borrow) {

									if (o_borrow.conditionFn) {
										o_borrow.conditionFn = ip2.getProperty(o_borrow.conditionFn);
									}

									Ext.applyIf(o_borrow, {
										conditionFn: function (value, oldValue) {
											return true;
										}
									});

									var i_field = o_fields[o_borrow.from];
									var s_trigger = o_borrow.trigger;
									var oldValue = "";

									if (i_field) {

										i_field.on({
											focus: {
												fn: function (i_self) {
													oldValue = this.getValue();
												}
											},
											change: {
												fn: function(i_field, value) {
													i_cmp.suspendCheckChange++;
													collectValue();
													i_cmp.resetOriginalValue();
													i_cmp.suspendCheckChange--;
													i_cmp.checkChange();
												},
												buffer: 10
											}
										});

										i_field.on(s_trigger, function (i_self) {
											i_field.__borrow_oldValue = oldValue;
											collectValue();
											delete i_field.__borrow_oldValue;
										});
									}
								});

								function getBorrowFromField(i_field) {
									var o_borrow = null;
									Ext.Array.some(o_borrows.fields, function (o_b) {
										if (o_b.from == i_field.name) {
											o_borrow = o_b;
											return true;
										}
									});
									return o_borrow;
								}

								function collectValue() {
									var value = i_cmp.getValue();

									var fields = Ext.Array.filter(Ext.Array.map(o_borrows.fields, function (o_borrow) {
										return o_fields[o_borrow.from];
									}), Boolean);

									if (!o_borrows.and) {
										fields = [fields[0]];
									}

									var b_allowed = Ext.Array.every(fields, function (i_field) {
										var o_borrow = getBorrowFromField(i_field);

										if (o_borrow) {
											var oldValue = i_field.__borrow_oldValue;
											if (oldValue === null) {
												oldValue = i_field.getValue();
											}

											var fn = o_borrow.conditionFn || Ext.emptyFn;

											return fn(value, oldValue, i_cmp, i_field);
										}

										// Silent fail - ignore this field
										else {
											return true;
										}
									});

									if (b_allowed) {
										// newValue will be an array:
										var newValue = Ext.Array.map(fields, function (i_field) {
											var o_borrow = getBorrowFromField(i_field);
											var newValue = i_field.getValue();
											return newValue;
										});

										if (o_borrows.and) {
											var a_newValue = newValue;
											newValue = {};

											Ext.Array.map(o_borrows.fields, function (o_borrow) {
												if (o_fields[o_borrow.from]) {
													newValue[o_borrow.from] = a_newValue.shift();
												}
											});
										}
										else {
											newValue = newValue[0];
										}
										// If value is undefined DONT set
										if (newValue !== void 0) {

											if (i_cmp.borrow.sanitizeFn) {
												newValue = i_cmp.borrow.sanitizeFn(newValue, i_cmp);
											}

											i_cmp.setValue(newValue);
											oldValue = newValue;
										}
									}
								}

								if (i_cmp.borrow.sanitizeFn) {
									i_cmp.borrow.sanitizeFn = ip2.getProperty(i_cmp.borrow.sanitizeFn);
								}
								else {
									i_cmp.borrow.sanitizeFn = function (value) {
										return value;
									};
								}

								if (o_borrows.initialize) {
									i_cmp.on({
										afterrender: {
											fn: function () {
												i_cmp.suspendCheckChange++;
												collectValue();
												i_cmp.resetOriginalValue();
												i_cmp.suspendCheckChange--;
											},
											buffer: 5,
											single: true
										}
									});
								}

								return i_cmp;
							}
						}
					},
					dependsOn: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config.dependsOn = Ext.isArray(value) ? value : [value];

								return o_config;
							},
							postprocess: function (i_child, value, o_fields, o_rule, o_xpd) {

								i_child.hide();
								i_child.disable();

								var b_hide;

								var n_counter = 0;

								function doCheck(o_checked) {
									if (n_counter === 0) {

										var a_allowed = [];

										Ext.Object.each(o_checked, function (s_key, b_allowed) {
											a_allowed.push(b_allowed);
										});

										checkChange(a_allowed);
									}
								}

								var a_fields = [];

								Ext.Array.each(value, function (o_depends, index) {

									var i_field = o_fields[o_depends.field];

									if (!i_field) {
										console.warn("NO FROM FIELD FOUND - YOU GET A DEBUGGER!");
										return;
									}

									// overloading (not)equals with (not)equal
									//   for the case when both are set we will use only (not)equal
									if (o_depends.equal) {
										o_depends.equals = [o_depends.equal];
									}

									if (o_depends.notEqual) {
										o_depends.notEquals = [o_depends.notEqual];
									}

									var b_found = false;

									Ext.Array.each(a_fields, function (o_config) {

										var i_saved = o_config.field;
										if (i_saved.name == i_field.name) {
											b_found = true;
											o_config.depends.push(o_depends);
											return false;
										}
									});

									if (!b_found) {
										a_fields.push({
											field: i_field,
											clearOnChange: o_depends.clearOnChange || false,
											apply: o_depends.apply || false,
											depends: [o_depends]
										});
									}

									if (o_depends.hasOwnProperty("hide")) {
										b_hide = o_depends.hide;
									}
								});

								Ext.Array.each(a_fields, function (o_config) {

									var i_field = o_config.field;

									i_child.mon(i_field, {
										afterrender: {
											fn: function (i_field) {
												check(o_config.depends);
											},
											single: true,
											buffer: 10
										},
										change: {
											fn: function (i_field, value) {
												if (o_config.clearOnChange) {
													i_child.setValue(null);
													i_child.allQuery = i_child.lastQuery = "";
												}
												check(o_config.depends);

											}
										},
										disable: {
											fn: function (i_field) {
												if (o_config.clearOnChange) {
													i_child.setValue(null);
													i_child.allQuery = i_child.lastQuery = "";
												}
												check(o_config.depends);

											}
										},
										enable: {
											fn: function (i_field) {
												check(o_config.depends);
											}
										}
									});

									function check(a_depends) {

										var a_allowed = [];

										var b_allowed = true;
										var b_service = false;

										var o_checked = {};

										var a_temp = [];


										Ext.Array.each(a_depends, function (o_depends) {

											if (!o_checked[o_depends.field]) {

												var value;

												if (o_depends.equals) {
													b_allowed = Ext.Array.some(o_depends.equals, function (equal) {
														return ip2.isEqual(i_field.getValue(), equal);
													});
												}

												if (o_depends.notEquals) {
													b_allowed = Ext.Array.every(o_depends.notEquals, function (notEqual) {
														return !ip2.isEqual(i_field.getValue(), notEqual);
													});
												}

												if (o_depends.empty) {
													value = i_field.getValue();

													b_allowed = Ext.isEmpty(value);
												}

												if (o_depends.notEmpty) {
													value = i_field.getValue();

													b_allowed = !Ext.isEmpty(value);
												}

												if (o_depends.regexp) {

													var s_regex = o_depends.regexp;

													var i_expression = new RegExp(s_regex);

													value = i_field.getValue();

													b_allowed = i_expression.test(value);
												}

												if (o_depends.service) {
													n_counter++;
													b_service = true;

													var o_service = o_depends.service;
													var o_json = Ext.apply({}, o_service.params);
													value = "";

													value = i_field.getValue();

													if (Ext.isArray(value)) {
														value = value[0];
													}

													o_json[i_field.name] = value;

													Ext.Ajax.request({
														url: o_service.url,
														method: "POST",
														jsonData: o_json,
														success: function (o_response) {

															var o_data = Ext.decode(o_response.responseText, true) || {};
															b_allowed = o_data.allowed ? true : false;
															o_checked[o_depends.field] = b_allowed;
															n_counter--;
															doCheck(o_checked);

														},
														failure: function () {
															n_counter--;
															o_checked[o_depends.field] = false;
															doCheck(o_checked);
														}
													});
												}
												if (!b_service) {

													o_checked[o_depends.field] = b_allowed;

													if (b_allowed) {

														if (o_depends.apply) {

															var o_initConfig = Ext.clone(i_child.initialConfig);

															Ext.apply(o_initConfig, o_depends.apply);

															i_child.initialConfig = o_initConfig;

															Ext.apply(i_child, o_initConfig);

															i_child.initComponent();
														}
													}
												}
											}
										});

										doCheck(o_checked);
									}
								});

								function checkChange(a_allowed) {

									var b_use = false;

									Ext.Array.each(a_allowed, function (b_allowed) {

										if (!b_allowed) {
											b_use = b_allowed;
											return false;
										}
										else {
											b_use = true;
										}
									});

									if (b_use) {
										i_child.show();
										i_child.enable();
									}
									else {
										i_child.hide();
										i_child.disable();
									}

									if (Ext.isDefined(b_hide)) {
										i_child[b_hide ? "hide" : "show"]();
									}

								}

								return i_child;
							}
						}
					},
					assimilate: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config.assimilate = ip2.isArray(value) ? value : [value];

								return o_config;
							},
							postprocess: function (i_child, value, o_fields, o_rule, o_xpd) {

								/*
								myProp: {
									"assimilate": [
										{
											"field": "hasPadding",
											"valueMapping": [
												{
													"oldValue": true,
													newValue: false
												},
												{
													oldValue: false,
													"newValue": true
												}
											],
											"takeValue": true
										}
									]
								}
								*/
								i_child.on({
									afterrender: {
										fn: function () {
											setTimeout(assimilateValue, 5);
										},
										single: true
									}
								});

								return i_child;

								function assimilateValue() {
									var i_xpdpanel = i_child.up("xpdpanel");

									if (i_xpdpanel) {
										Ext.Array.each(value, function (cfg) {
											// We cannot use .getValue() because it removed the values we need :-)
											var o_initialValue = i_xpdpanel.initialConfig.value;
											if (cfg.field in o_initialValue) {

												var fieldValue = o_initialValue[cfg.field];
												var found = false;

												if (cfg.valueMapping) {
													found = Ext.Array.some(cfg.valueMapping, function (map) {
														if (fieldValue === map.oldValue) {
															fieldValue = map.newValue;
															return true;
														}
													});
												}

												if (found || cfg.takeValue) {
													i_child.setValue(fieldValue);
													i_child.resetOriginalValue();
												}
											}
										});
									}
								}
							}
						}
					},
					onValue: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								switch (o_config.type) {

									case "boolean":
										o_config.inputValue = value;
										break;

									default: break;
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					offValue: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								switch (o_config.type) {

									case "boolean":
										o_config.uncheckedValue = value;
										break;

									default: break;
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					enum: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								var S_ENUM_FILE = "adm.ns";
								// Setup value/display keys for store
								var s_valueKey = o_config.valueField || "key";
								var s_displayKey = o_config.displayField || "name";

								// If no store has been defined - setup one
								if (!o_config.store) {
									o_config.store = {
										fields: [
											{ name: s_valueKey, type: "auto" },
											{ name: s_displayKey, type: "string" }
										],
										proxy: {
											type: "memory"
										}
									};
								}

								// Supply the store with ENUM data
								o_config.store.data = (function () {

									// Get the enum resource and create the enum instance
									var o_enum = ip2.resource.get(S_ENUM_FILE);
									var i_enum = new ip2.DynamicNS(o_enum);

									// Prepare data array and get the enum keys ready to iterate over
									var a_data = [];
									var a_keys = i_enum.getEnumLayoutKeys(value, /-text$/);

									// Language is used in bottom of iteration when the "record" is made
									// to get the right view value out
									var s_language = ip2.session.getLanguage();

									// Iterate the enum keys to build the store data array
									Ext.Array.each(a_keys, function (s_key) {

										var o_value = i_enum.getEnumValue(s_key);

										if (o_config._xpdConfig.postprocess) {

											// Post process the key to clean the value
											Ext.Array.each(o_config._xpdConfig.postprocess, function (ins) {

												if (ins.regexp) {
													s_key = s_key.replace(new RegExp(ins.regexp, "g"), ins.replace || "");
												}
												else if (ins.search) {
													s_key = s_key.replace(ins.search, ins.replace || "");
												}
											});
										}

										var o_dataValue = {};
										o_dataValue[s_valueKey] = s_key;
										o_dataValue[s_displayKey] = o_value[s_language] || o_value.en || o_value.da;
										a_data.push(o_dataValue);
									});
									a_data.sort(function (a, b) {

										var s_keyA = a[s_valueKey] || 0;
										var s_keyB = b[s_valueKey] || 0;

										if (Ext.isNumber(parseFloat(s_keyA)) && Ext.isNumber(parseFloat(s_keyA))) {
											return parseFloat(s_keyA) > parseFloat(s_keyB);
										}
										else {

											s_keyA = a[s_displayKey];
											s_keyB = b[s_displayKey];

											return s_keyA.toLowerCase() > s_keyB.toLowerCase();
										}
									});

									return a_data;
								})();

								if (!o_config.queryMode) {
									o_config.queryMode = "local";
								}

								// Enums are forceSelection true by default
								// unless creation is allowed
								if (o_config.allowCreate) {
									o_config.forceSelection = false;
								}
								else {
									o_config.forceSelection = true;
								}

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					xpd: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					emptyText: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config[s_key] = ip2.i18n(value);

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					seoValidation: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								value = value || {};
								var a_plugins = o_config.plugins || (o_config.plugins = []);
								var s_serviceUrl = value.url || "/wsh-services/services/wshproxy.aspx";

								var s_valueKey = value.valueKey || "URI";
								var n_delay = value.delay || 300;

								var o_error = value.errorMessage || {
									da: "Dette er ikke en valid SEO url",
									en: "This is not a valid SEO url"
								};

								var o_extraParms = value.extraParams || {
									action: "getSEOUrl"
								}

								a_plugins.push({
									ptype: "uniquevalidation",
									errorMessage: ip2.i18n(o_error),
									serviceUrl: s_serviceUrl,
									delay: n_delay,
									extraParams: o_extraParms,
									valueKey: s_valueKey,
									asJson: value.asJson,
									parseHandler: function (s_response) {

										var o_response = Ext.decode(s_response, true) || {};
										var b_valid = o_response.hasOwnProperty("success") ? o_response.success : true;
										var i_dataParent = this.up("entityform");

										if (b_valid) {
											if (!i_dataParent) {
												i_dataParent = this.up("form");
											}

											if (i_dataParent) {
												var i_form = i_dataParent.getForm();
												var i_record = i_form.getRecord();
												if (i_record) {
													n_token = i_record.get(value.tokenKey);
													b_valid = n_token == o_response.token || !o_response.token;
												}
											}
										}

										return b_valid;
									}
								});

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					hidden: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								if (value) {
									i_cmp.on("afterrender", function () {
										setTimeout(function () {
											i_cmp.hide();
										}, 0);
									});
								}

								return i_cmp;
							}
						}
					},
					vtypeText: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config[s_key] = ip2.i18n(s_key);

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					stripCharsRe: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config[s_key] = new RegExp(value);

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					regexp: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config.regex = new RegExp(value);

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					translate: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								return i_cmp;
							}
						}
					},
					relaychange: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								return o_config;
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								if (value) {

									i_cmp.on({
										change: {
											fn: function (i_self, newValue, oldValue) {

												var i_form = i_self.up("entityform");

												if (i_form) {
													i_form.fireEvent("relaychange", i_form, i_self, newValue);
												}
											}
										}
									});
								}

								return i_cmp;
							}
						}
					},
					isFormField: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								if (o_config.isWidget && !value) {
									o_config[s_key] = true;
								}

								return o_config;
							}
						}
					},
					triggers: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								var o_triggers = i_cmp.getTriggers() || {};

								Ext.Object.each(o_triggers, function (s_trigger) {

									var o_trigger = i_cmp.getTrigger(s_trigger);
									var handler = o_trigger.handler || Ext.emptyFn;

									if (Ext.isString(handler)) {
										if (Ext.String.startsWith(handler, "(") && Ext.String.endsWith(handler, ")")) {
											o_trigger.handler = eval(handler);
										}
										else if (Ext.String.startsWith(handler, "ip2")) {
											o_trigger.handler = ip2.getProperty(handler);
										}
									}
									if (o_trigger.tooltip) {
										o_trigger.tooltip = ip2.i18n(o_trigger.tooltip);
									}
								});

								return i_cmp;
							}
						}
					},
					fieldParams: {
						grid: {
							preprocess: function (o_config, value, o_xpd) {

								return o_config;
							},
							postprocess: function (i_cmp) {

								return i_cmp;
							}
						},
						form: {
							preprocess: function (o_config, s_key, value, o_xpd, o_data) {

								o_config.initField = function () {

									var i_self = this;

									if (i_self.getStore) {

										var i_store = i_self.getStore();

										i_store.on({
											beforeload: {
												fn: function() {

													var i_formpanel = i_self.up("form");

													var i_form;

													if (i_formpanel) {
														i_form = i_formpanel.getForm();
													}

													var a_fields = i_self.fieldParams || [];

													var i_proxy = i_store.getProxy();

													var o_extraParms = i_proxy.getExtraParams();

													var o_values = {};

													Ext.Array.each(a_fields, function (o_config) {

														var a_parts = o_config.name.split(".");
														var s_name = a_parts.shift();
														var s_property = o_config.property || s_name;

														var value = o_data[s_name];

														if (i_form) {

															var i_field = i_form.findField(s_name);

															if (i_field) {
																value = i_field.getValue();
															}
														}

														if (a_parts.length > 0 && Ext.isObject(value)) {

															Ext.Array.each(a_parts, function (s_key) {

																if (Ext.isObject(value) && value.hasOwnProperty(s_key)) {
																	value = value[s_key];
																}
															})
														}

														o_values[s_property] = value;
													});

													o_values.field = i_self.name;

													Ext.apply(o_extraParms, o_values);
												}
											}
										});
									}
									i_self.superclass.initField.call(i_self);
								};
							},
							postprocess: function (i_cmp, value, o_fields, o_rule, o_xpd) {

								var a_fields = i_cmp.fieldParams || [];

								if (i_cmp.getStore) {
									var i_store = i_cmp.getStore();

									var a_params = [];

									Ext.Array.each(a_fields, function (o_config) {

										var i_field = o_fields[o_config.name];

										if (i_field) {

											a_params.push({
												field: i_field,
												property: o_config.property || i_field.name
											});
										}
									});

									i_store.on({
										beforeload: {
											fn: function (i_store, i_operation) {

												var i_proxy = i_store.getProxy();

												var o_extraParms = i_proxy.getExtraParams();

												var o_values = {};

												Ext.Array.each(a_params, function (o_config) {

													var i_field = o_config.field;
													o_values[o_config.property] = i_field.getValue();
												});

												o_values.field = i_cmp.name;

												Ext.apply(o_extraParms, o_values);
											}
										}
									});
								}

								return i_cmp;
							}
						}
					}
				}
			}
		});

		i_self.doInit();
    },

	doInit: function () {

		var i_self = this;

		var o_all = Ext.apply({}, {});
		var o_properties = Ext.apply({}, i_self.properties || {});
		var o_collections = Ext.apply({}, i_self.collections || {});

		Ext.Object.each(o_properties, function (s_key, value) {
			o_all[s_key] = value;
		});

		Ext.Object.each(o_collections, function (s_key, o_collection) {
			Ext.Object.each(o_collection.properties, function (s_key, value) {
				if (!o_all.hasOwnProperty(s_key)) {
					o_all[s_key] = value;
				}
			});
		});

		i_self.allProperties = o_all;
		i_self.flatten = Portfolio.util.Handler.xpd.flatten(i_self, null, true);
	}
});
