View Full Version : Changing type of custom properties

2 Feb 2012, 2:44 PM
I have a menu that has a datepicker submenu, and it works fine - I select the menu, and the datepicker shows up. According to the Ext.menu.DatePicker docs, I'm supposed to use the "initialConfig" property to set configuration options on the underlying date picker object (specifically in my case - minDate and maxDate).

1. The "Date Menu" object doesn't have an initialConfig property in Designer - which would be nice to have.

2. I can get around that by adding a custom initialConfig property, but the value of that property is written out as a string and not an object. I don't see any way to change how that value gets written out.

Is there a way to control the type of custom properties that are added in Designer (without hacking the metadata)?

2 Feb 2012, 3:16 PM
azuroff -

If you add a custom property without setting a value it will assume a default of string. This is unchangeable.

If you add the custom property while setting a value it will determine what that value was and use that. This is also unchangeable.

For example if you put in initialConfig: {} and then click Add the key will know that it is a type of object.

That being said, we shoudl automatically be handling this for you and you should not be mucking about directly with initialConfig :)

24 May 2012, 3:04 AM
You've made my day!

How about a default property? For example for Ext.dataview.Dataview we have an itemTpl property with array type as default. I would like to implement Ext.XTemplate object. How should I do that? It always converts that to string (puts '' around object) :/