use of com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog in project openmeetings by apache.
the class AbstractWicketTester method getButtonBehavior.
public static <T extends Serializable> ButtonAjaxBehavior getButtonBehavior(WicketTester tester, String path, String name) {
Args.notNull(path, "path");
Args.notNull(name, "name");
@SuppressWarnings("unchecked") AbstractDialog<T> dialog = (AbstractDialog<T>) tester.getComponentFromLastRenderedPage(path);
List<ButtonAjaxBehavior> bl = dialog.getBehaviors(ButtonAjaxBehavior.class);
for (ButtonAjaxBehavior bb : bl) {
if (name.equals(bb.getButton().getName())) {
return bb;
}
}
fail(String.format("Button '%s' not found for dialog '%s'", name, path));
return null;
}
Aggregations