Could you further explain what you mean with “However, it doesn’t changes its background”? Does the server side have the right value (getValue() returns the same as you set with setValue()) but the component itself doesn’t show anything being selected? Or is it the other way around?
If possible, could you recreate the problem in a simple demonstration, isolating the problem?
I think you’ve stumbled upon the same (sort of) bug that I did
#3609 . E.g. updating an invisible component (the modal dialog is hidden == invisible) causes only the server-side to update, but it never sends the changes to the web browser.
There’s currently no fix, but the workaround is to wait until the component is visible before you call setValue.
You should probably add your case to the ticket, I think the R&D guys would want to know that this is a more general problem.
I suspect that you are right. The node gets selected (on server side), but its background doesn’t change (on client side). But if dialog is visible, both serverside and clientside behave correct.
Unfortunately, I can not use suggested workaround, since node selection happens in constructor of dialog.