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 you if this browser plug-in is not installed or are deactivated. For this, the application has to register for the necessary plug-ins. Only if a registration exists for a plug-in, can the status of the plug-in be checked in the browser.

Procedure

  1. Implement a call of method GET_CLIENT_INFORMATION of interface IF_WD_APPLICATION (for example, in method WDDOINIT). An instance of interface IF_WD_CLIENT_INFORMATION is returned.
    Source Code
    wd_this->get_componentcontroller_ctr( )->wd_get_api( )->get_application( )->get_client_information( ).
  2. Create the event handler that will be called if the required browser plug-in is missing (e.g. ONACTIONFLASH_NOT_AVAILABLE or ONACTIONJAVA_NOT_AVAILABLE).
  3. 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.
    Source Code
    register(  
    event     =  if_wd_client_information =>e_event-pdf_not_available    
    view      =  view   
    action    =  `PDF_NOT_AVAILABLE` ).
  4. Implement the event handler methods. The presence of plug-ins is checked while the page is being opened on the client. It is assumed that all plug-ins are available and activated in the browser. If plug-ins have a registration but are not activated, a round trip is triggered on the client after the check, and the relevant event handler methods called on the server. A round trip is not triggered for plug-ins that are activated and have a registration.
  5. To find out the status of a plug-in at a later time, you can use the following get methods of interface IF_WD_CLIENT_INFORMATION (e.g. in method WDDOMODIFYVIEW). If a plug-in is available, the method returns ABAP_TRUE. If a check has not yet been made for a plug-in (the plug-in does not yet have a registration), the method also returns ABAP_TRUE. If the application is started with only one roundtrip (without loading animation), information about availability of the browser plug-in is not available initially. In this case, exception cx_wd_client_information is thrown.
    • GET_FLASH_AVAILABLE
    • GET_JAVA_AVAILABLE
    • GET_PDF_AVAILABLE
    • GET_SILVERLIGHT_AVAILABLE