I guess many people come across this bug, when doing think like configuring a grouper of a list.

I found a workaround for the bug, that could be used in many of the situations that it occures.
(I actually figured it out while writing this post, in frustration, to ask if anyone had found a work around yet)

Since we are unable to have space after e.g. return (before variable name) we can only return "status" text - or concatenation text, starting with ''.

So coding

{
groupFn : function(record) {
return record.get('navn')[0];
}
}

does not work, since it "compiles" to:

{
groupFn : function(record) {
returnrecord.get('navn')[
0
];
}
}

However coding:

{
groupFn : function(record) {
return '' + record.get('navn')[0];
}
}

Works, since it "compiles" to:

{
groupFn : function(record) {
return''+record.get('navn')[
0
];
}
}

So, this makes be able to code most of the configurations, and test functionallity, while waiting for the bug fix.

Once fixed I will hopefully remember to remove ''+, but if I don't it's not the worst overhead you can have in an application :)

aconran

5 Mar 2012, 9:24 AM

We have a bunch of enhancements regarding editing both templates and functions in the coming builds which will address your concerns here.