Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi all,
we are trying to add some custom attributes to the ESI map file which will be gathered and added by a custom ESIWTPartRenderer's adjustPartElement() function. If we initiate a publish on a part, then everything works as expected: our custom code is called, we read out the needed data and set it as the specific attribute's value.
The problem is, that if there is a link between a document and a part and I initiate the publish on the document (wan't the document, the related parts and the link in between to be published), then the part's custom renderer is not called... therefor the custom attribute won't get a value.
Any ideas how to force the custom renderer to be called even in case of an indirect publishing of the part (publishing the document that has a link to the part).
BR,
Tamás
Solved! Go to Solution.
The following (extended) functions are called in the following cases.
public class ESIDocumentsCustomRenderer extends ESIDocumentsRenderer { private static final Log logger = LogFactory.getLog(ESIDocumentsCustomRenderer.class.getName()); @SuppressWarnings("rawtypes") @Override protected Element adjustDocumentElement(Element elem, String paramString, Document document, Collection paramCollection) throws ESIRendererException { logger.info("Custom ESI Document Renderer Started");
public class ESIEPMDocumentCustomRenderer extends ESIEPMDocumentRenderer { private static final Log LOGGER = LogFactory.getLog(ESIEPMDocumentCustomRenderer.class.getName()); @SuppressWarnings("rawtypes") @Override protected Element adjustDocumentElement(Element elem, String group, Document document, Collection targets) throws ESIRendererException { LOGGER.info("Custom ESI EPM Document Renderer Started");
public class ESIWTPartCustomRenderer extends ESIWTPartRenderer { private static final Log LOGGER = LogFactory.getLog(ESIWTPartCustomRenderer.class.getName()); @SuppressWarnings("rawtypes") @Override protected Element adjustPartElement(Element elem, String group, WTPart part, Eff[] effs, Collection targets) throws ESIRendererException { LOGGER.info("Custom ESI Part Renderer Started");
When an EPMDocument/WTDocument is linked to a WTPart the following functions are called:
a) adjustPartElement() from ESIWTPartRenderer classb) adjustDocLinkElement() from ESIDocumentsRenderer class
c) adjustDocumentElement() from ESIDocumentsRenderer class
The following (extended) functions are called in the following cases.
public class ESIDocumentsCustomRenderer extends ESIDocumentsRenderer { private static final Log logger = LogFactory.getLog(ESIDocumentsCustomRenderer.class.getName()); @SuppressWarnings("rawtypes") @Override protected Element adjustDocumentElement(Element elem, String paramString, Document document, Collection paramCollection) throws ESIRendererException { logger.info("Custom ESI Document Renderer Started");
public class ESIEPMDocumentCustomRenderer extends ESIEPMDocumentRenderer { private static final Log LOGGER = LogFactory.getLog(ESIEPMDocumentCustomRenderer.class.getName()); @SuppressWarnings("rawtypes") @Override protected Element adjustDocumentElement(Element elem, String group, Document document, Collection targets) throws ESIRendererException { LOGGER.info("Custom ESI EPM Document Renderer Started");
public class ESIWTPartCustomRenderer extends ESIWTPartRenderer { private static final Log LOGGER = LogFactory.getLog(ESIWTPartCustomRenderer.class.getName()); @SuppressWarnings("rawtypes") @Override protected Element adjustPartElement(Element elem, String group, WTPart part, Eff[] effs, Collection targets) throws ESIRendererException { LOGGER.info("Custom ESI Part Renderer Started");
When an EPMDocument/WTDocument is linked to a WTPart the following functions are called:
a) adjustPartElement() from ESIWTPartRenderer classb) adjustDocLinkElement() from ESIDocumentsRenderer class
c) adjustDocumentElement() from ESIDocumentsRenderer class