Interface ComponentPageElementResources

    • Method Detail

      • getMessages

        Messages getMessages​(ComponentModel componentModel)
        Used to obtain a Messages instance for a particular component. If the component extends from another component, then its localized properties will merge with its parent's properties (with the subclass overriding the super class on any conflicts).
        Parameters:
        componentModel -
        Returns:
        the message catalog for the component, in the indicated locale
        See Also:
        ComponentMessagesSource
      • coerce

        <S,​T> T coerce​(S input,
                             Class<T> targetType)
        Performs a coercion from an input type to a desired output type. When the target type is a primitive, the actual conversion will be to the equivalent wrapper type. In some cases, the TypeCoercer will need to search for an appropriate coercion, and may even combine existing coercions to form new ones; in those cases, the results of the search are cached.
        Type Parameters:
        S - source type (input)
        T - target type (output)
        Parameters:
        input -
        targetType - defines the target type
        Returns:
        the coerced value
        See Also:
        TypeCoercer
      • toClass

        Class toClass​(String className)
        Gets the Class instance for then give name.
        Parameters:
        className - fully qualified class name
        Returns:
        the class instance
        See Also:
        ComponentClassCache
      • createComponentEventLink

        Link createComponentEventLink​(ComponentResources resources,
                                      String eventType,
                                      boolean forForm,
                                      Object... context)
        Creates a link on behalf of a component.
        Parameters:
        resources - resources for the component
        eventType - type of event to create
        forForm - true if generating for a form submission
        context - additional event context associated with the link
        Returns:
        the link
        Since:
        5.1.0.0
      • createPageRenderLink

        Link createPageRenderLink​(String pageName,
                                  boolean override,
                                  Object... context)
        Creates a page render request link to render a specific page.
        Parameters:
        pageName - the logical name of the page to link to
        override - if true, the context is used even if empty (normally, the target page is allowed to passivate, providing a context, when the provided context is empty)
        context - the activation context for the page. If omitted, the activation context is obtained from the target page
        Returns:
        link for a render request to the targetted page
        Since:
        5.1.0.0
      • createPageRenderLink

        Link createPageRenderLink​(Class pageClass,
                                  boolean override,
                                  Object... context)
        Creates a page render request link to render a specific page. Using a page class, rather than a page name, is more refactoring safe (in the even the page is renamed or moved).
        Parameters:
        pageClass - identifies the page to link to
        override - if true, the context is used even if empty (normally, the target page is allowed to passivate, providing a context, when the provided context is empty)
        context - the activation context for the page. If omitted, the activation context is obtained from the target page
        Returns:
        link for a render request to the targetted page
        Since:
        5.1
      • getEventLogger

        org.slf4j.Logger getEventLogger​(org.slf4j.Logger componentLogger)
        Returns the event logger for the provided component logger. The event logger is based on the component logger's name (which matches the component class name) with a "tapestry..events." prefix.
        Parameters:
        componentLogger - provides base name for logger
        Returns:
        the logger
      • isRenderTracingEnabled

        boolean isRenderTracingEnabled()
        Returns true if component element tracing is enabled. When enabled, rendering of the component produces additional comments to identify what component and stage is rendering.
        Since:
        5.4