Class Strings2


  • public final class Strings2
    extends Object
    helper class to handle string interaction
    Author:
    miha
    • Method Detail

      • nullToEmpty

        public static String nullToEmpty​(String value)
        ensures a non null value.
        Parameters:
        value - string value to transform to an empty string if it's null
        Returns:
        non null value
      • getMarkupId

        public static CharSequence getMarkupId​(Component component)
        Returns a markup id that is JQuery-safe and could be used as a selector.
        Parameters:
        component - the component which markup id should be return
        Returns:
        the component's markup id that is escaped so that it could be used as JQuery selector
      • escapeMarkupId

        public static CharSequence escapeMarkupId​(CharSequence markupId)
        Returns a markup id that is JQuery-safe and could be used as a selector.
        Parameters:
        markupId - the markup id to escape
        Returns:
        the component's markup id that is escaped so that it could be used as JQuery selector