/** * 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); }
/** * 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); }