/** * Skip the body markup associated with the 'component'. The body markup is expected to be raw * markup only, not containing an wicket component. The body markup may serve documentary * purposes for the developer / designer. * <p> * Than search for the markup of the fragment, effectively replacing the original markup. */ @Override public void onComponentTagBody(final Component component, final MarkupStream markupStream, final ComponentTag openTag) { // Skip the body markup making sure it contains only raw markup super.onComponentTagBody(component, markupStream, openTag); // Get the fragments open tag MarkupStream stream = new MarkupStream(getMarkup((MarkupContainer)component, null)); ComponentTag fragmentOpenTag = stream.getTag(); // if it is an open close tag, skip this fragment. if (!fragmentOpenTag.isOpenClose()) { // We'll completely ignore the fragments open tag. It'll not be rendered stream.next(); // Render the body of the fragment component.onComponentTagBody(stream, fragmentOpenTag); } }
/** * Skip the body markup associated with the 'component'. The body markup is expected to be raw * markup only, not containing an wicket component. The body markup may serve documentary * purposes for the developer / designer. * <p> * Than search for the markup of the fragment, effectively replacing the original markup. */ @Override public void onComponentTagBody(final Component component, final MarkupStream markupStream, final ComponentTag openTag) { // Skip the body markup making sure it contains only raw markup super.onComponentTagBody(component, markupStream, openTag); // Get the fragments open tag MarkupStream stream = new MarkupStream(getMarkup((MarkupContainer)component, null)); ComponentTag fragmentOpenTag = stream.getTag(); // if it is an open close tag, skip this fragment. if (!fragmentOpenTag.isOpenClose()) { // We'll completely ignore the fragments open tag. It'll not be rendered stream.next(); // Render the body of the fragment component.onComponentTagBody(stream, fragmentOpenTag); } }