Replace getUserData()/setUserData() with CustomEvents
Merge pull request #2683 from vyv03354/bug824601

Replace getUserData()/setUserData() with CustomEvents
Add 'pagemode' URL parameter - comments addressed