/** * Get the markup of the child. * * @see Component#getMarkup() * * @param child * The child component. If null, the container's markup will be returned. See Border, * Panel or Enclosure where getMarkup(null) != getMarkup(). * @return The child's markup */ public IMarkupFragment getMarkup(final Component child) { // Delegate request to attached markup sourcing strategy. return getMarkupSourcingStrategy().getMarkup(this, child); }
/** * Processes the component tag. * * Overrides of this method most likely should call the super implementation. * * @param tag * Tag to modify */ protected void onComponentTag(final ComponentTag tag) { // We can't try to get the ID from markup. This could be different than // id returned from getMarkupId() prior first rendering the component // (due to transparent resolvers and borders which break the 1:1 // component <-> markup relation) if (getFlag(FLAG_OUTPUT_MARKUP_ID)) { tag.putInternal(MARKUP_ID_ATTR_NAME, getMarkupId()); } DebugSettings debugSettings = getApplication().getDebugSettings(); String componentPathAttributeName = debugSettings.getComponentPathAttributeName(); if (Strings.isEmpty(componentPathAttributeName) == false) { String path = getPageRelativePath(); path = path.replace("_", "__"); path = path.replace(':', '_'); tag.put(componentPathAttributeName, path); } // The markup sourcing strategy may also want to work on the tag getMarkupSourcingStrategy().onComponentTag(this, tag); }
getMarkupSourcingStrategy().renderHead(this, container); CharSequence headerContribution = markupHeaderResponse.getBuffer(); if (Strings.isEmpty(headerContribution) == false)
getMarkupSourcingStrategy().onComponentTagBody(this, markupStream, tag);
/** * Processes the component tag. * * Overrides of this method most likely should call the super implementation. * * @param tag * Tag to modify */ protected void onComponentTag(final ComponentTag tag) { // We can't try to get the ID from markup. This could be different than // id returned from getMarkupId() prior first rendering the component // (due to transparent resolvers and borders which break the 1:1 // component <-> markup relation) if (getFlag(FLAG_OUTPUT_MARKUP_ID)) { tag.putInternal(MARKUP_ID_ATTR_NAME, getMarkupId()); } DebugSettings debugSettings = getApplication().getDebugSettings(); String componentPathAttributeName = debugSettings.getComponentPathAttributeName(); if (Strings.isEmpty(componentPathAttributeName) == false) { String path = getPageRelativePath(); path = path.replace("_", "__"); path = path.replace(':', '_'); tag.put(componentPathAttributeName, path); } // The markup sourcing strategy may also want to work on the tag getMarkupSourcingStrategy().onComponentTag(this, tag); }
getMarkupSourcingStrategy().renderHead(this, container); CharSequence headerContribution = markupHeaderResponse.getBuffer(); if (Strings.isEmpty(headerContribution) == false)
getMarkupSourcingStrategy().onComponentTagBody(this, markupStream, tag);
/** * Get the markup of the child. * * @see Component#getMarkup() * * @param child * The child component. If null, the container's markup will be returned. See Border, * Panel or Enclosure where getMarkup(null) != getMarkup(). * @return The child's markup */ public IMarkupFragment getMarkup(final Component child) { // Delegate request to attached markup sourcing strategy. return getMarkupSourcingStrategy().getMarkup(this, child); }
@Override public DequeueContext newDequeueContext() { IMarkupFragment markup = getMarkupSourcingStrategy().getMarkup(this, null); if (markup == null) { return null; } return new DequeueContext(markup, this, true); } }
@Override public DequeueContext newDequeueContext() { IMarkupFragment markup = getMarkupSourcingStrategy().getMarkup(this, null); if (markup == null) { return null; } return new DequeueContext(markup, this, true); } }