cuba-platform / cuba

CUBA Platform is a high level framework for enterprise applications development
https://www.cuba-platform.com
Apache License 2.0
1.34k stars 219 forks source link

WebTokenList doesn't show options added in datasource with refreshMode = Never #3204

Open Ilya-c opened 3 years ago

Ilya-c commented 3 years ago

Environment

Description of the bug or enhancement

In version 7.2.10 then we select any options in TokenList new value is passed directly to the valueSource thus setting the VALID state for the datasource (see selected line on the screenshot below).

image

This case can be reproduced in the screen-profiler window - it contains tokenList bound to the datasource with refresh-mode = NEVER. Currently we're not able to add users in this screen to collect profiling data.

 <dsContext>
        <collectionDatasource id="allUsersDs" class="com.haulmont.cuba.security.entity.User" view="_minimal">
            <query>select u from sec$User u order by u.name</query>
        </collectionDatasource>
        <collectionDatasource id="usersDs" class="com.haulmont.cuba.security.entity.User" view="_minimal"
                              refreshMode="NEVER" allowCommit="false"/>
....

  <tokenList datasource="usersDs" inline="true" width="350px" height="100px">
                            <lookup optionsDatasource="allUsersDs"/>
                        </tokenList>