TokenList - IllegalArgumentException

I’m trying to use TokenList control in my application but I’m getting IllegalArgumentException when I try to select the item from the list.
I’ve created a test project following Cuba Sampler example but still get the same exception.
Please point me what I’m missing. Here is my test project: (97.2 KB)


The problem occured due incorrect defining of optionsContainer value in lookup attribute of tokenList.

You should create new data component collection for entity OrderItem in order-edit.xml:

<collection id="orderItemsDc" class="">
     <view extends="_local">
         <property name="product" view="_minimal"/>
    <loader id="orderItemsDl">
               <![CDATA[select e from testtokenlist_OrderItem e]]>

This container should be used in lookup:

<lookup optionsContainer="orderItemsDc"/>

Pay attention to property product in view component, it should be defined to avoid IllegalStateException: Cannot get unfetched attribute [product].


Thank You for the explanation