java.lang.Object
de.agilecoders.wicket.core.util.Components
Helper class for components.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertTag(Component component, ComponentTag tag, String... tagNames) checks if given tag has one of given tag names else aMarkupExceptionwill be thrown.static voidassertTag(Component component, ComponentTag tag, Set<? extends String> tagNames) checks if given tag has one of given tag names else aMarkupExceptionwill be thrown.static booleanhasTagName(ComponentTag tag, String... tagNames) checks if given tag has one of given tag names.static booleanhasTagName(ComponentTag tag, Set<? extends String> tagNames) checks if given tag has one of given tag names.static voidhideIfModelIsEmpty(Component component) checks given component' default model, if it's empty or null the component will be hidden.static voidsets all given components visible
-
Method Details
-
hasTagName
checks if given tag has one of given tag names.- Parameters:
tag- The component tagtagNames- the names that at least one must match- Returns:
- true if given tag has one of given tag names.
-
hasTagName
checks if given tag has one of given tag names.- Parameters:
tag- The component tagtagNames- the names that at least one must match- Returns:
- true if given tag has one of given tag names.
-
assertTag
checks if given tag has one of given tag names else aMarkupExceptionwill be thrown.- Parameters:
component- The componenttag- The component tagtagNames- the names that at least one must match- Throws:
MarkupException- if given tag has none of given tag names
-
assertTag
checks if given tag has one of given tag names else aMarkupExceptionwill be thrown.- Parameters:
component- The componenttag- The component tagtagNames- the names that at least one must match- Throws:
MarkupException- if given tag has none of given tag names
-
hideIfModelIsEmpty
checks given component' default model, if it's empty or null the component will be hidden.- Parameters:
component- component to check
-
show
sets all given components visible- Parameters:
components- The components to show
-