when changeTotalPage render the page