try by using layout(true); after adding the components in onrender.