Show TOC

Syntax documentationPage Service Locate 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.

    Syntax Syntax

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

    Syntax Syntax

    1. IPageService pageService = (IPageService)
          WDPortalUtils.getService(IPageService.KEY);
      
      // display iView Search
      pageService.showIView("Search");
      
      // hide iView Details
      pageService.hideIView("Details");
      
    End of the code.

    Note Note

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

    End of the note.
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