T - the type of the component to findpublic final class Selection<T extends org.apache.wicket.Component> extends Object
Label label = select(Label.class).withId("name").that(is(visibleInHierarchy())).firstFrom(wmc);
| Modifier and Type | Method and Description |
|---|---|
<X extends T> |
firstFrom(org.apache.wicket.MarkupContainer container)
Get the first element matching the given set of matchers.
|
<X extends T> |
firstOrNullFrom(org.apache.wicket.MarkupContainer container)
Get the first element matching the given set of matchers from the given container.
|
<X extends T> |
from(org.apache.wicket.MarkupContainer container)
List the components matching the given set of matchers that reside under
container in the hierarchy. |
static <T extends org.apache.wicket.Component> |
select(Class<T> clazz) |
static <T extends org.apache.wicket.Component> |
select(Class<T> clazz,
String markupId) |
static Selection<org.apache.wicket.Component> |
selectWithId(String markupId) |
Selection<T> |
that(org.hamcrest.Matcher<? super T> matcher)
Add the given matcher to the set of matchers to use when searching for the components.
|
Selection<T> |
withId(String markupId) |
public static <T extends org.apache.wicket.Component> Selection<T> select(Class<T> clazz, String markupId)
public Selection<T> that(org.hamcrest.Matcher<? super T> matcher)
matcher - the matcher to addthis to allow chainingfrom(org.apache.wicket.MarkupContainer)public <X extends T> List<X> from(org.apache.wicket.MarkupContainer container)
container in the hierarchy.X - the type of the returned componentscontainer - the container to search forpublic <X extends T> X firstFrom(org.apache.wicket.MarkupContainer container)
IllegalArgumentException
if no components matching the given set of matchers were found in the given container.X - the type of the returned componentscontainer - the container to search forfrom(org.apache.wicket.MarkupContainer),
firstOrNullFrom(org.apache.wicket.MarkupContainer)public <X extends T> X firstOrNullFrom(org.apache.wicket.MarkupContainer container)
null if none found.X - the type of the returned componentscontainer - the container to search fornull if none found.from(org.apache.wicket.MarkupContainer),
firstFrom(org.apache.wicket.MarkupContainer)Copyright © 2013 Nitor Creations. All Rights Reserved.