Example usage for org.apache.wicket.markup.html.panel PanelMarkupSourcingStrategy PanelMarkupSourcingStrategy

List of usage examples for org.apache.wicket.markup.html.panel PanelMarkupSourcingStrategy PanelMarkupSourcingStrategy

Introduction

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

Prototype

public PanelMarkupSourcingStrategy(final boolean allowWicketComponentsInBodyMarkup) 

Source Link

Document

Constructor.

Usage

From source file:com.aplombee.TestQuickViewContainer.java

License:Apache License

@Override
protected IMarkupSourcingStrategy newMarkupSourcingStrategy() {
    return new PanelMarkupSourcingStrategy(false);
}

From source file:com.gmail.volodymyrdotsenko.jqxwicket.widgets.tabs.TabbedPanel.java

License:Apache License

@Override
protected IMarkupSourcingStrategy newMarkupSourcingStrategy() {
    return new PanelMarkupSourcingStrategy(true);
}

From source file:eu.esdihumboldt.hale.server.webapp.components.bootstrap.NavbarExternalLink.java

License:Open Source License

/**
 * {@inheritDoc}
 */
@Override
protected IMarkupSourcingStrategy newMarkupSourcingStrategy() {
    return new PanelMarkupSourcingStrategy(true);
}

From source file:org.cdlflex.ui.markup.html.button.DropDownButton.java

License:Apache License

@Override
protected final IMarkupSourcingStrategy newMarkupSourcingStrategy() {
    return new PanelMarkupSourcingStrategy(false);
}

From source file:org.efaps.ui.wicket.components.links.IconCheckOutLink.java

License:Apache License

/**
 * {@inheritDoc}
 */
@Override
protected IMarkupSourcingStrategy newMarkupSourcingStrategy() {
    return new PanelMarkupSourcingStrategy(false);
}

From source file:org.opensingular.lib.wicket.util.bootstrap.layout.TemplatePanel.java

License:Apache License

@Override
protected IMarkupSourcingStrategy newMarkupSourcingStrategy() {
    return new PanelMarkupSourcingStrategy(false) {
        @Override//from w w  w.jav  a2s . c  o m
        public IMarkupFragment getMarkup(MarkupContainer parent, Component child) {
            // corrige o problema de encoding
            StringResourceStream stringResourceStream = new StringResourceStream(
                    "<wicket:panel>" + getTemplateFunction().apply(TemplatePanel.this) + "</wicket:panel>",
                    "text/html");
            stringResourceStream.setCharset(Charset.forName(
                    Optional.ofNullable(Application.get().getMarkupSettings().getDefaultMarkupEncoding())
                            .orElse(StandardCharsets.UTF_8.name())));

            MarkupParser markupParser = new MarkupParser(new MarkupResourceStream(stringResourceStream));
            markupParser.setWicketNamespace(MarkupParser.WICKET);
            Markup markup;
            try {
                markup = markupParser.parse();
            } catch (Exception e) {
                throw SingularUtil.propagate(e);
            }

            // If child == null, than return the markup fragment starting
            // with <wicket:panel>
            if (child == null) {
                return markup;
            }

            // Copiado da superclasse. buscando markup do child
            IMarkupFragment associatedMarkup = markup.find(child.getId());
            if (associatedMarkup != null) {
                return associatedMarkup;
            }
            associatedMarkup = searchMarkupInTransparentResolvers(parent, parent.getMarkup(), child);
            if (associatedMarkup != null) {
                return associatedMarkup;
            }
            return findMarkupInAssociatedFileHeader(parent, child);
        }

        @Override
        public void onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag) {
            TemplatePanel.this.onBeforeComponentTagBody(markupStream, openTag);
            super.onComponentTagBody(component, markupStream, openTag);
            TemplatePanel.this.onAfterComponentTagBody(markupStream, openTag);
        }
    };
}