implement onAction for search dialog