setPageAction refactoring