How to call a <h:panelgroup> recursively nd display on the UI by click on command button in the same

I am new in the JSf and i am not aware how to call a panel group recursively on the UI by click on command button which is available in the same panel group that is displaying on the UI.
Once the user click on button the same group shoud display with blank field that is including DataTable and two button. Once click grop will display and button will Hide.