Show TOC

Page ServiceLocate this document in the navigation structure

The page service provides information about the page in which the application is running, and enables you to perform the following tasks:

  • Getting a list of the atomic names of the visible iViews in the page.

    You may want to use this method to avoid updating the user interface of an iView when it is not visible.

    IPageService pageService = (IPageService)
        WDPortalUtils.getService(IPageService.KEY);
    
    // String array receives iView names
    String[] iViews = pageService.getVisibleIViews();
    
                   
  • Hiding/showing iViews in the page

    IPageService pageService = (IPageService)
        WDPortalUtils.getService(IPageService.KEY);
    
    // display iView Search
    pageService.showIView("Search");
    
    // hide iView Details
    pageService.hideIView("Details");
    
                   
    Note

    Changes to the visibility of iViews are not saved. When a user refreshes the page, the original settings are restored.

Dependencies

In order to use the APIs in this section, you must create the following dependency references in your project:

SC

DC

EP-RUNTIME

tc/ep/pagebuilder/api