Example usage for org.apache.wicket.markup.html.link InlineFrame InlineFrame

List of usage examples for org.apache.wicket.markup.html.link InlineFrame InlineFrame

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.link InlineFrame InlineFrame.

Prototype

public InlineFrame(final String id, IPageProvider pageProvider) 

Source Link

Document

This constructor is ideal for constructing pages lazily.

Usage

From source file:org.cast.cwm.drawtool.SvgEditor.java

License:Open Source License

/**
 * Returns an {@link InlineFrame} that displays this SVG Editor.  This is the
 * preferred component to add to a page.
 * //from  ww w . jav a2  s.com
 * @param id wicket:id
 * @return
 */
public InlineFrame getEditor(String id) {
    InlineFrame frame = new InlineFrame(id, this);
    frame.add(AttributeModifier.replace("style", "background:#FFFFFF;border:2px solid #AAAAAA"));
    frame.add(AttributeModifier.replace("width", String.valueOf(EDITOR_WIDTH)));
    frame.add(AttributeModifier.replace("height", String.valueOf(EDITOR_HEIGHT)));
    frame.add(AttributeModifier.replace("scrolling", "no"));
    frame.setOutputMarkupId(true);
    return frame;
}

From source file:org.obiba.onyx.marble.core.wicket.consent.ElectronicConsentPanel.java

License:Open Source License

@Override
protected void onBeforeRender() {
    Boolean consentIsAccepted = activeConsentService.getConsent().isAccepted();
    Boolean consentIsValid = activeConsentService.validateElectronicConsent();
    Boolean consentIsSubmitted = activeConsentService.isConsentFormSubmitted();
    Component finishButton = form.getFinishLink();

    // If consent form not submitted yet, display a new blank form in the IFrame.
    if (!consentIsSubmitted) {
        addOrReplace(new InlineFrame("pdfSubmitFrame", new ElectronicConsentPage(finishButton)));

        // If consent form is submitted and valid, display confirmation page in the IFrame.
    } else if (!consentIsAccepted || (consentIsAccepted && consentIsValid)) {
        addOrReplace(//from  ww  w  .  ja v  a  2  s .  c  o  m
                new InlineFrame("pdfSubmitFrame", new ElectronicConsentSubmittedPage(finishButton.getId())));

        // If submitted but invalid, display current form in the IFrame + error message.
    } else if (consentIsAccepted && !consentIsValid) {
        addOrReplace(new InlineFrame("pdfSubmitFrame", new ElectronicConsentPage(finishButton)));
        error(getString("InvalidConsentForm"));
    }
    super.onBeforeRender();
}