Example usage for org.apache.wicket.ajax.markup.html AjaxLink getParent

List of usage examples for org.apache.wicket.ajax.markup.html AjaxLink getParent

Introduction

In this page you can find the example usage for org.apache.wicket.ajax.markup.html AjaxLink getParent.

Prototype

@Override
public final MarkupContainer getParent() 

Source Link

Document

Gets any parent container, or null if there is none.

Usage

From source file:org.geoserver.importer.web.ImportPage.java

License:Open Source License

AjaxLink cancelLink(AjaxLink importLink) {
    return (AjaxLink) importLink.getParent().get("cancel");
}

From source file:org.obiba.onyx.jade.core.wicket.instrument.InstrumentLaunchPanelTest.java

License:Open Source License

@Test
public void testPresenceOfManualButtonWhenManualCaptureAllowed() {
    instrumentType.setManualCaptureAllowed(true);

    expect(activeInstrumentRunServiceMock.getInstrumentType()).andReturn(instrumentType).anyTimes();
    expect(activeInstrumentRunServiceMock.updateReadOnlyInputParameterRunValue()).andReturn(null).anyTimes();
    expect(activeInstrumentRunServiceMock.getInstrumentRun()).andReturn(new InstrumentRun()).anyTimes();

    replay(activeInstrumentRunServiceMock);

    InstrumentLaunchPanel instrumentLaunchPanel = createInstrumentLaunchPanel();

    verify(activeInstrumentRunServiceMock);

    // Verify visibility of the "enter values manually" button (this implies the visibility of its parent).
    AjaxLink manualButton = (AjaxLink) instrumentLaunchPanel.get("measures:manualButton");
    assertNotNull(manualButton);//from   w w w . j av a2s.c  o  m
    MarkupContainer parent = manualButton.getParent();
    assertNotNull(parent);
    assertTrue(manualButton.isVisible());
    assertTrue(parent.isVisible());
}