Amit,
I had a similar problem, and could not figure out why I couldn't set my component back to visible, And Mustafa I was using the SAPUI5 handler.
What I did to overcome it, was place it inside a standart component, a Panel for example.
And then set that one visible or not.
Hope this helps.
Best
Leandro