Class Placeholder


  • public class Placeholder
    extends java.lang.Object
    Class to handle placeholders
    • Field Detail

      • DEFAULT_PLACEHOLDER_TOUCH

        public static final java.lang.String DEFAULT_PLACEHOLDER_TOUCH
        See Also:
        Constant Field Values
      • ATTRIBUTE_EMTPYTEXT

        public static final java.lang.String ATTRIBUTE_EMTPYTEXT
        See Also:
        Constant Field Values
    • Constructor Detail

      • Placeholder

        public Placeholder()
    • Method Detail

      • isAuthoringUIModeTouch

        public static boolean isAuthoringUIModeTouch​(ServletRequest slingRequest)
        Check if UI is in authoring mode TOUCH
        Parameters:
        slingRequest - request
        Returns:
        true if UI authoring is in TOUCH mode
      • getDefaultPlaceholder

        public static java.lang.String getDefaultPlaceholder​(ServletRequest slingRequest,
                                                             java.lang.String title,
                                                             java.lang.String defaultPlaceholder,
                                                             java.lang.String... addClasses)
        Get default placeholder for any component incl. title as text information
        Parameters:
        slingRequest - request
        title - text information for placeholder
        defaultPlaceholder - default placeholder
        addClasses - add additional classes to the placeholder div
        Returns:
        default placeholder for component
      • getDefaultPlaceholder

        public static java.lang.String getDefaultPlaceholder​(ServletRequest slingRequest,
                                                             Component component,
                                                             java.lang.String defaultPlaceholder,
                                                             java.lang.String... addClasses)
        Get default placeholder for any component incl. title as text information
        Parameters:
        slingRequest - request
        component - component to read title from
        defaultPlaceholder - default placeholder
        addClasses - add additional classes to the placeholder div
        Returns:
        default placeholder for component
      • getDefaultPlaceholder

        public static java.lang.String getDefaultPlaceholder​(ServletRequest slingRequest,
                                                             Component component,
                                                             java.lang.String defaultPlaceholder)
        Get default placeholder for any component incl. title as text information
        Parameters:
        slingRequest - request
        component - component to read title from
        defaultPlaceholder - default placeholder
        Returns:
        default placeholder for component
      • getComponentTitle

        public static java.lang.String getComponentTitle​(Component component)
        Get title of component
        Parameters:
        component - Component
        Returns:
        component title