Example usage for org.apache.wicket.markup.repeater RepeatingView get

List of usage examples for org.apache.wicket.markup.repeater RepeatingView get

Introduction

In this page you can find the example usage for org.apache.wicket.markup.repeater RepeatingView get.

Prototype

@Override
public final Component get(String path) 

Source Link

Document

Get a child component by looking it up with the given path.

Usage

From source file:com.effectivemaven.centrepoint.web.EditPanelConfigurationPageTest.java

License:Apache License

@SuppressWarnings("unchecked")
private void assertForm(String name, String value) {
    wicketTester.assertComponent(EDIT_PANEL_CONFIG_FORM + ":row", RepeatingView.class);
    RepeatingView rv = (RepeatingView) wicketTester
            .getComponentFromLastRenderedPage(EDIT_PANEL_CONFIG_FORM + ":row");
    assert rv.size() == 1;
    WebMarkupContainer c = (WebMarkupContainer) rv.get(0);
    assert name.equals(c.get("name").getDefaultModelObjectAsString());
    TextField<String> field = (TextField<String>) c.get("value");
    assert field.getModelObject() == value;
}

From source file:org.openengsb.ui.admin.editorPage.EditorPageTest.java

License:Apache License

@Test
public void attributesWithDefaultValues_shouldInitializeModelWithDefaults() throws Exception {
    tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
    RepeatingView list = (RepeatingView) tester
            .getComponentFromLastRenderedPage("editor:form:attributesPanel:fields");
    @SuppressWarnings("unchecked")
    TextField<String> component = (TextField<String>) list.get("a:row:field");
    assertThat(component.getModelObject(), is("a_default"));
    tester.debugComponentTrees();//from  w  w  w  .  java2s. co m
}

From source file:org.openengsb.ui.admin.testClient.TestClientTest.java

License:Apache License

@Test
public void testCreateTextFieldsForBean() throws Exception {
    setupAndStartTestClientPage();// w w w. jav  a2 s .co  m
    RepeatingView argList = (RepeatingView) tester
            .getComponentFromLastRenderedPage("methodCallForm:argumentListContainer:argumentList");

    setServiceInDropDown(2);
    setMethodInDropDown(1);

    Assert.assertEquals(1, argList.size());
    Assert.assertEquals(BeanEditorPanel.class, argList.get("arg0panel:valueEditor").getClass());
    tester.debugComponentTrees();
    RepeatingView panel = (RepeatingView) argList.get("arg0panel:valueEditor:fields");
    Assert.assertEquals(2, panel.size());
}