This looks right to me. Did the code work after your components were in active state ?My next question would be, when you say your component is not working ? can you say what is not working ? (As in, any exception in logs if the components are active)In the page, where you have your custom component...