I have the following code in my project using dstore and dgrid. When I use the filter operators I get compile error in eclipse as well as Closure compiler that comes with Dojo build.
storeFilter = new origStore.Filter().or(new origStore.Filter().in('category', ['Action', 'Thriller', 'Comedy']), new origStore.Filter().eq('newRelease', true));
grid.set('collection', origStore.filter(storeFilter));
Eclispe Error: Syntax error on token '.', Identifier expected after this token.
Closure compiler: error at '.in', Identifier expected.
Compiling dgrid and dstore packages using closure compiler goes smoothly. But when I compile my package with above code result in error.
I also want to note that the code works as expected in all browsers.
Could any of you shed some light here.
Thanks!.
Try replacing .in
with ['in']
, since in
is a reserved word.