Show TOC

Checking for the Presence of Browser Plug-InsLocate this document in the navigation structure

To display active UI elements, the relevant browser plug-ins must be available. If these plug-ins are missing, you can, for instance, offer an alternative display.

Context

Web Dynpro ABAP applications that contain UI elements FlashIsland, SilverlightIsland, InteractiveForm, AcfExecute, or AcfUpDownload can only be displayed if the plug-ins for Flash, Silverlight, Adobe Reader or Java are available. Methods of interface IF_WD_CLIENT_INFORMATION can notify you if this browser plug-in is not installed or are deactivated.

Procedure

  1. To retrieve an instance of interface IF_WD_CLIENT_INFORMATION, call method GET_CLIENT_INFORMATION of interface IF_WD_APPLICATION (for example, in method WDDOINIT).
    You can use the following code:
    Source Code
    wd_this->get_componentcontroller_ctr( )->wd_get_api( )->get_application( )->get_client_information( ). 
  2. Use the following GET methods of interface IF_WD_CLIENT_INFORMATION (e.g. in method WDDOMODIFYVIEW) to retrieve the relevant properties:
    • GET_FLASH_AVAILABLE
    • GET_JAVA_AVAILABLE
    • GET_PDF_AVAILABLE
    • GET_SILVERLIGHT_AVAILABLE

      If the application is started with only one roundtrip (without loading aninmation), information about availability of the browser plug-in is not available initially. In this case, the exception cx_wd_client_information is thrown.

      If the information is needed at this point, you can register event handlers. This will trigger a roundtrip.

      To register an event handler:

      1. Create the event handler that will be called if the required browser plug-in is missing (e.g. ONACTIONFLASH_NOT_AVAILABLEoder ONACTIONJAVA_NOT_AVAILABLE).
      2. Link the event handler to the associated event (e.g. in method WDDOMODIFYVIEW).

        To do this, you use method REGISTER of interface IF_WD_CLIENT_INFORMATION.

        You can use the following code:

        Source Code
        register(  
        event     =  if_wd_client_information =>e_event-pdf_not_available    
        view      =  view   
        action    =  `PDF_NOT_AVAILABLE` ).
      3. Implement the event handler methods.

        The presence of plug-ins is checked while the page is being opened on the client.