[OE-5177] move logic from view to widget model