i am porting my software from Vaadin Touchkit 1.0 to 2.0.
In version 1.0 I handled username and password in the
parameterHandler on startup. But in Touchkit 2.0 i have to
wait for the onBrowserDetailsReady() method to distinguish
between tablet or smartphone. The username and password
are stored in a ThreadLocal so that i can later access them.
Everything worked fine in V 1.0, but in V2.0 when I initialize my
UI from onBrowserDetailsReady() all ThreadLocals are null.
Does anybody know why?
If you are in a sub-thread (a thread started from a thread), check that the variables are InheritableThreadLocal – in spite of the name, this should pretty much be the default, but because of the name, we often see that the regular ThreadLocal is used, with unintended (bad) consequences.
i tried to change it to InheritableThreadLocal but nothing changes. The ThreadLocal is instantiated in the handleParameters method.
In Touchkit Version 1 everything worked fine.
Hello!
How can I access application instances from event thread when thread local pattern is used to manage application instances?.
I always receive null because no application instances are associated with event thread. How can I handle that?
Thank you.