Class Components

java.lang.Object
de.agilecoders.wicket.core.util.Components

public final class Components extends Object
Helper class for components.
  • Method Details

    • hasTagName

      public static boolean hasTagName(ComponentTag tag, String... tagNames)
      checks if given tag has one of given tag names.
      Parameters:
      tag - The component tag
      tagNames - the names that at least one must match
      Returns:
      true if given tag has one of given tag names.
    • hasTagName

      public static boolean hasTagName(ComponentTag tag, Set<? extends String> tagNames)
      checks if given tag has one of given tag names.
      Parameters:
      tag - The component tag
      tagNames - the names that at least one must match
      Returns:
      true if given tag has one of given tag names.
    • assertTag

      public static void assertTag(Component component, ComponentTag tag, String... tagNames)
      checks if given tag has one of given tag names else a MarkupException will be thrown.
      Parameters:
      component - The component
      tag - The component tag
      tagNames - the names that at least one must match
      Throws:
      MarkupException - if given tag has none of given tag names
    • assertTag

      public static void assertTag(Component component, ComponentTag tag, Set<? extends String> tagNames)
      checks if given tag has one of given tag names else a MarkupException will be thrown.
      Parameters:
      component - The component
      tag - The component tag
      tagNames - the names that at least one must match
      Throws:
      MarkupException - if given tag has none of given tag names
    • hideIfModelIsEmpty

      public static void hideIfModelIsEmpty(Component component)
      checks given component' default model, if it's empty or null the component will be hidden.
      Parameters:
      component - component to check
    • show

      public static void show(Component... components)
      sets all given components visible
      Parameters:
      components - The components to show