RavenDB NotSupportedException

When I run the code


I got following exception

RavenDB NotSupportedException

An exception of type 'System.NotSupportedException' occurred in Raven.Client.Lightweight.dll but was not handled in user code

Additional information: Could not understand expression: .Where(p => p.ProductSn.Contains(value(YSPOS.MainWindow+<>c__DisplayClass10_0).barCode))


It's because there is no index for ProductSn attribute is created.



To fix this issue, we need create index fo ProductSn attribute.


Create a class extending AbstractIndexCreationTask class


Then execute this index creation task after DocumentStore initialization.


Ext JS 6 Modern Set Field Renderer in itemTpl

In Ext Js 6 Modern (or Sencha Touch), if Ext.grid.plugin.RowExpander plugin is enabled for Ext.grid.Grid, there will be a expander icon (plus icon) at left side of each row. Clicking the expander icon will expand the selected row, and more detail will be displayed. This detail page can be set by itemConfig.body.tpl option.


Like following code


And the tpl option is actually XTemplate, so the above code can be written as following form as well:


Note that here XTemplate cannot be replaced by Template class (using Template will display raw literal value as {...})



To use a renderer function for field in the template string, we need add a member function to the template

Then the template can be changed like this



Ext JS 6 Modern Set TabBar Scrollable

By default in Ext JS 6 Modern version (or Sencha Touch), the TabPanel's TabBar is not scrollable. That means if opened tabs is too many that the TabBar will push the earlier tabs to left side, then they will become invisible anymore (because it's not scrollable)

To make it scrollable, we need set tabBar.scrollable config to true when creating TabPanel

Then we can drag the TabBar to scroll it.


By default the scrollable is 'horizontal' , and of course you can set it to 'vertical' .