Search in sources :

Example 1 with PanelMarkupSourcingStrategy

use of org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy in project wicket by apache.

the class HeaderSectionMyLabel method newMarkupSourcingStrategy.

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

        @Override
        public IMarkupFragment getMarkup(final MarkupContainer parent, final Component child) {
            MarkupStream markup = new MarkupStream(parent.getAssociatedMarkup());
            markup.skipRawMarkup();
            return markup.getMarkupFragment();
        }

        @Override
        public void onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag) {
            HeaderSectionMyLabel.this.onComponentTagBody(markupStream, openTag);
        }
    };
}
Also used : WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) MarkupContainer(org.apache.wicket.MarkupContainer) PanelMarkupSourcingStrategy(org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy) ComponentTag(org.apache.wicket.markup.ComponentTag) MarkupStream(org.apache.wicket.markup.MarkupStream) Component(org.apache.wicket.Component)

Aggregations

Component (org.apache.wicket.Component)1 MarkupContainer (org.apache.wicket.MarkupContainer)1 ComponentTag (org.apache.wicket.markup.ComponentTag)1 MarkupStream (org.apache.wicket.markup.MarkupStream)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1 PanelMarkupSourcingStrategy (org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy)1