Interface ComponentSource

  • All Known Implementing Classes:

    public interface ComponentSource
    Used by classes that need to retrieve a component by its complete id, or a page by its logical page name or root component class. The complete id is the logical name of the containing page, a colon, and the nested component id. It may also just be the page name (for the root component of a page).
    • Method Detail

      • getComponent

        Component getComponent​(String completeId)
        Gets a component by its complete id. If the component id is for a mixin, then the mixin attached to the component will be returned. A mixin's complete id is its container's complete id, suffixed with "$" and the mixin's id (its simple class name).
        completeId - complete component id (case insensitive)
        the component
        IllegalArgumentException - if the component can not be found
        See Also:
      • getPage

        Component getPage​(String pageName)
        Returns the page identified by its logical page name. A logical page name is the short form of a page name often emebedded into URLs.
        pageName - the logical page name
        the corresponding page's root component
        IllegalArgumentException - if the page can not be found
      • getPage

        Component getPage​(Class pageClass)
        A convienience for obtaining a page instance via a class instance. This is provided so as to be refactoring safe. The pageClass is simply converted to a class name and this is used to locate a page instance.
        pageClass - used to locate the page instance
        the page instance
      • getActivePage

        Component getActivePage()
        Returns the active page, as defined by RequestGlobals.getActivePageName(). This is the primary page for handling the current request, the page which will be activated for the request. The identity of the active page is not known until the correct Dispatcher determines this.
        the active page, or null if no active page is yet identified