Hi
Is there any way for change select item mechanism in tree component ? Now I use ItemClickAction method which react on double mouse click.
Hi
Is there any way for change select item mechanism in tree component ? Now I use ItemClickAction method which react on double mouse click.
Hello @andrzej.paluch72
Could you clarify what exactly you want to do? If you want programmatically select an item you can just invoke tree.setValue(item).
Regards,
Daniil
I need to react on change item in tree component from interface. How I use for this ItemClickAction, but this method react on double mouse click. One mouse click select item only. Maybe there is other method which react on single mouse click.
In this case you can subscribe for ValueChangeEvent:
tree.addValueChangeListener(e -> {
// handle
});
but tree component doesn’t extend Field interface and addValueChangeListener
isn’t available. Any suggestion ?
I’m sorry - have mixed up CUBA component wrapper with actual component.
You can unwrap tree and add listener to inner component:
tree.unwrap(CubaTree.class).addValueChangeListener(e -> ...);
Regards,
Daniil.