/** * Position the markup stream at the child component relative to the <b>provider</b> markup * * @param path * @return The markup stream for the given component. */ public MarkupStream findComponentIndex(final String path) { MarkupStream markupStream = getAssociatedMarkupStream(true); int index = markupStream.findComponentIndex(markupId, path); if (index == -1) { throw new MarkupException("Markup of component class `" + markupStream.getContainerClass().getName() + "` does not contain a fragment with wicket:id `" + markupId + "`. Context: " + toString()); } markupStream.setCurrentIndex(index); return markupStream; }
/** * Position the markup stream at the child component relative to the <b>provider</b> markup * * @param path * @return The markup stream for the given component. */ public MarkupStream findComponentIndex(final String path) { MarkupStream markupStream = getAssociatedMarkupStream(true); int index = markupStream.findComponentIndex(associatedMarkupId, path); if (index == -1) { throw new MarkupException("Markup of component class `" + markupStream.getContainerClass().getName() + "` does not contain a fragment with wicket:id `" + associatedMarkupId + "`. Context: " + toString()); } markupStream.setCurrentIndex(index); return markupStream; }
/** * * @see org.apache.wicket.Component#onComponentTagBody(org.apache.wicket.markup.MarkupStream, * org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Skip the components body. It will be replaced by the fragment if (((ComponentTag)markupStream.get(markupStream.getCurrentIndex() - 1)).isOpen()) { markupStream.skipRawMarkup(); } final MarkupStream providerMarkupStream = chooseMarkupStream(markupStream); if (providerMarkupStream == null) { throw new MarkupNotFoundException( "Fragment: No markup stream found for providing markup container " + markupProvider.toString() + ". Fragment: " + toString()); } renderFragment(providerMarkupStream, openTag); }
/** * * @see org.apache.wicket.Component#onComponentTagBody(org.apache.wicket.markup.MarkupStream, * org.apache.wicket.markup.ComponentTag) */ protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Skip the components body. It will be replaced by the fragment if (((ComponentTag)markupStream.get(markupStream.getCurrentIndex() - 1)).isOpen()) { markupStream.skipRawMarkup(); } final MarkupStream providerMarkupStream = chooseMarkupStream(markupStream); if (providerMarkupStream == null) { throw new MarkupNotFoundException( "Fragment: No markup stream found for providing markup container " + markupProvider.toString() + ". Fragment: " + toString()); } renderFragment(providerMarkupStream, openTag); }
providerMarkupStream.getContainerClass().getName() + "` does not contain a fragment with wicket:id `" + associatedMarkupId + "`. Context: " + toString());
providerMarkupStream.getContainerClass().getName() + "` does not contain a fragment with wicket:id `" + markupId + "`. Context: " + toString());