I have a tokenList which doesn’t work. The select function works good but doesn’t save records in database @JoinTable(name = “CRM_TRANSACTION_PAYMENT_LINK”.
Actually Add and Remove buttons work well and I can remove TokenList but just I’m curios what is the issue.
Please give me a hint.
TokenList is placed in Payment view. Payment is nested in Transaction (many-to-many).
Is Cuba6 imported in Cuba 7. In Cuba 7 I added a new attribute (bank) in Payment, many-to one.
Bank UI is now made in Cuba 7 (with Data Containers).
For the old Cuba 6 version, TokenList works.
Thank you very much for your effort.
Unfortunately the model is quite different.
In your demo Item is made in Cuba 7 and Order is made in Cuba 6.
In my case both are made in Cuba 6 and tokenList works. So far so good.
In addition in Item (payment) I added another attribute Bank (many_to_one) and also a separate Entity (Bank) that has screens made in Cuba 7. All the screens has lookup actions check it.
I don’t know if this is the reason of the problem but after that tokenList didn’t work anymore.
Payments are not saved in Transaction anymore.
Maybe you can give me a hint, where/what should I investigate?
Pay attention… the Add Remove buttons work.
I saw that Add Remove buttons are related to the (payment) table while tokenList is related to the Datasource(paymentDs).
The tokenList advantage is that can be positioned in any screen (tab).
Now I tested your tokenlist demo.
Unfortunately doesn’t work!
Please enter, let say, two Items in Items UI.
After that please select an Item from tokenList Order (don’t use Add and Remove buttons!).
Apparently it works but try to REOPEN Order. The selected Item(s) are gone!
Doesn’t save in database. The same issue!
I also recorded a demo for you but unfortunately .mp4 is not authorized.
I have no errors but neither any commit:
2019-05-02 16:15:30.672 DEBUG [http-nio-8080-exec-8/app/admin] com.haulmont.cuba.web.App - Closing all windows in all UIs
2019-05-02 16:15:30.677 DEBUG [http-nio-8080-exec-8/app-core/admin] com.haulmont.cuba.security.app.UserSessions - Removed session: cf78aa04-f338-27cb-1964-979c7b0d2f69 [admin], since: Thu May 02 16:09:53 EEST 2019, lastUsed: Thu May 02 16:10:05 EEST 2019
2019-05-02 16:15:30.678 INFO [http-nio-8080-exec-8/app-core/admin] com.haulmont.cuba.security.auth.AuthenticationManagerBean - Logged out: cf78aa04-f338-27cb-1964-979c7b0d2f69 [admin]
2019-05-02 16:15:30.692 DEBUG [http-nio-8080-exec-8] com.haulmont.cuba.web.DefaultApp - connectionStateChanged connected: false, authenticated: false
2019-05-02 16:15:30.693 DEBUG [http-nio-8080-exec-8] com.haulmont.cuba.web.App - Closing all windows in all UIs
2019-05-02 16:15:30.701 DEBUG [http-nio-8080-exec-8/app/anonymous] com.haulmont.cuba.web.DefaultApp - connectionStateChanged connected: true, authenticated: false
2019-05-02 16:15:30.702 DEBUG [http-nio-8080-exec-8/app/anonymous] com.haulmont.cuba.web.App - Closing all windows in all UIs
2019-05-02 16:15:32.365 INFO [http-nio-8080-exec-7/app-core/server] com.haulmont.cuba.security.auth.AuthenticationManagerBean - Logged in: e39911c4-e086-affc-04ee-1a5afd2c72c3 [admin]
2019-05-02 16:15:32.368 DEBUG [http-nio-8080-exec-7/app/admin] com.haulmont.cuba.web.DefaultApp - connectionStateChanged connected: true, authenticated: true
2019-05-02 16:15:32.368 DEBUG [http-nio-8080-exec-7/app/admin] com.haulmont.cuba.web.App - Closing all windows in all UIs
2019-05-02 16:15:32.370 DEBUG [http-nio-8080-exec-7/app/admin] com.haulmont.cuba.web.DefaultApp - Session reinitialized: HttpSession=org.apache.catalina.session.StandardSessionFacade@4ed9e298, timeout=1800sec, UserSession=e39911c4-e086-affc-04ee-1a5afd2c72c3 [admin]
2019-05-02 16:15:32.392 DEBUG [http-nio-8080-exec-7/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sec$UserSubstitution, view=com.haulmont.cuba.security.entity.UserSubstitution/app, query=select us from sec$UserSubstitution us where us.user.id = :userId and (us.endDate is null or us.endDate >= :currentDate) and (us.startDate is null or us.startDate <= :currentDate) and (us.substitutedUser.active = true or us.substitutedUser.active is null) order by us.substitutedUser.name
2019-05-02 16:15:34.605 DEBUG [http-nio-8080-exec-10/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sec$Filter, view=com.haulmont.cuba.security.entity.FilterEntity/app, query=select f from sec$Filter f left join f.user u where f.componentId = :component and (u.id = :userId or u is null) order by f.name
2019-05-02 16:15:34.660 DEBUG [http-nio-8080-exec-10/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sample_Item, view=com.company.sample.entity.Item/item-view, query=select e from sample_Item, max=5000
2019-05-02 16:15:36.067 DEBUG [http-nio-8080-exec-4/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sec$Filter, view=com.haulmont.cuba.security.entity.FilterEntity/app, query=select f from sec$Filter f left join f.user u where f.componentId = :component and (u.id = :userId or u is null) order by f.name
2019-05-02 16:15:36.116 DEBUG [http-nio-8080-exec-4/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sample_Order, view=com.company.sample.entity.Order/order-view, query=select e from sample_Order e, max=50
2019-05-02 16:15:37.693 DEBUG [http-nio-8080-exec-2/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - load: metaClass=sample_Order, id=35435976-53f7-cc7e-4961-99110d5ba6f8, view=com.company.sample.entity.Order/order-view
2019-05-02 16:15:37.719 DEBUG [http-nio-8080-exec-2/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sample_Item, view=com.company.sample.entity.Item/item-view, query=select i from sample_Item i, max=10000
2019-05-02 16:15:44.671 DEBUG [http-nio-8080-exec-15/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - load: metaClass=sample_Order, id=35435976-53f7-cc7e-4961-99110d5ba6f8, view=com.company.sample.entity.Order/order-view
2019-05-02 16:15:44.695 DEBUG [http-nio-8080-exec-15/app-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sample_Item, view=com.company.sample.entity.Item/item-view, query=select i from sample_Item i, max=10000
As long as the same demo works on your machine and doesn’t work on my computer I think is a configuration problem.
Below you can see my settings:
Cuba Studio installed as Idea plugin.
platform version: platform-7.0.4
database type: hsqldb
plugin: CUBA V9.0-1813
JVM: java-8-oracle
Intellij 2019.1
Is there any possibility to provide you a recording demo?
Regards,
n
albudarov
(Alexander Budarov)
Split this topic
#18