private static IHelpViewer createViewer ( Page page ) { IHelpViewer viewer ; if ( getViewerMode ( page ) == HelpViewerMode . POPUP ) { viewer = new HelpViewerProxy ( page ) ; } else { BaseComponent root = PageUtil . createPage ( VIEWER_URL , page ) . get ( 0 ) ; viewer = ( IHelpViewer ) root . getAttribute ( "controller" ) ; } page . setAttribute ( VIEWER_ATTRIB , viewer ) ; return viewer ; }
Creates an instance of the help viewer associating it with the specified page .