Class LinkTransformerInterceptor

    • Method Detail

      • createComponentEventLink

        public Link createComponentEventLink​(ComponentEventRequestParameters parameters,
                                             boolean forForm)
        Description copied from interface: ComponentEventLinkEncoder
        Creates a link that encapsulates a component event request, including PersistentLocale (if set). Forms:
        • /context/pagename:eventname -- event on the page, no action context
        • /context/pagename:eventname/foo/bar -- event on the page with action context "foo", "bar"
        • /context/pagename.foo.bar -- event on component foo.bar within the page, default event, no action context
        • /context/pagename.foo.bar/baz.gnu -- event on component foo.bar within the page, default event, with action context "baz", "gnu"
        • /context/pagename.bar.baz:eventname/foo/gnu -- event on component bar.baz within the page with action context "foo" , "gnu"
        The persistent locale may be placed in between the context name and the page name, i.e., "/context/fr/SomePage". In many cases the context name is blank, so the path begins with a "/" and then the locale name or page name. The page name portion may itself consist of a series of folder names, i.e., "admin/user/create". The context portion isn't the concern of this code, since Request.getPath() will already have stripped that off. We can act as if the context is always "/" (the path always starts with a slash). Passes the resulting Link through the ComponentEventLinkTransformer chain of command, returning the result.
        Specified by:
        createComponentEventLink in interface ComponentEventLinkEncoder
        Parameters:
        parameters - defining page, component, activation context and other details
        forForm - true if the event link will trigger a form submission
        Returns:
        link for the component event