pharix
9 Mar 2012, 9:31 PM
When setting a custom property on any component (i.e.: Store), if a line is longer than width of free-form textfield, it will truncate / strip out white spaces.
Example scenario:
1. Create a Store.
2. Add custom property "grouper".
3. Add the following into the value of grouper:
{
groupFn: function(record) {
return record.get('last_name').substr(0, 1);
},
sortProperty: 'last_name'
}
4. Generated code becomes:
grouper: {
groupFn: function(record){
returnrecord.get('last_name').substr(0,
1);
},
sortProperty: 'last_name'
},
Also ... is there a nicer way to put in custom properties into components? The textbox is really tiny, and doesn't always treat the text I put into the box as "code", and instead it tries to convert it into a String:
This:
custom_value = { something: this.someMethod('xx') }
Becomes:
custom_value: '{\nsomething: this.someMethod(\'xx\')\n}'
It's my first post, so I apologize if I'm not posting it right. Let me know if I should be posting both of the above issues separately or if I should be posting differently and I'll learn quick!
Example scenario:
1. Create a Store.
2. Add custom property "grouper".
3. Add the following into the value of grouper:
{
groupFn: function(record) {
return record.get('last_name').substr(0, 1);
},
sortProperty: 'last_name'
}
4. Generated code becomes:
grouper: {
groupFn: function(record){
returnrecord.get('last_name').substr(0,
1);
},
sortProperty: 'last_name'
},
Also ... is there a nicer way to put in custom properties into components? The textbox is really tiny, and doesn't always treat the text I put into the box as "code", and instead it tries to convert it into a String:
This:
custom_value = { something: this.someMethod('xx') }
Becomes:
custom_value: '{\nsomething: this.someMethod(\'xx\')\n}'
It's my first post, so I apologize if I'm not posting it right. Let me know if I should be posting both of the above issues separately or if I should be posting differently and I'll learn quick!