Platform Explorer / Nuxeo Platform 2023.12


Resolution Order

The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.


XML Source

<?xml version="1.0"?>
<component name="">

  Register the template to be used by Salesforce.RenderBusinessMetadata
  See com.quandora.web.rendering.api.DefaultDocumentView for all the fields available on a Document object in a freemarker template
  See org.nuxeo.ecm.automation.core.scripting.Scripting initBindings method for global variables available in the template 
  You can debug by putting the  resource inside the data/resources folder and referencing it using the relative name from that folder. 
  <extension target="" point="resources">
    <!-- resource name="salesforce-business-metadata">salesforce-business-metadata.ftl</resource -->
    <resource name="salesforce-business-metadata">OSGI-INF/salesforce-business-metadata.ftl</resource>


	An operation which is generating a HTML fragment displaying the business metadata    
    <scriptedOperation id="Salesforce.RenderBusinessMetadata">
	  <param name="lang" type="String" />
        <![CDATA[function run(input, params) {
        	// push the client language in the context
        	ctx.SALESFORCE_LANG = params.lang;
        	var blob = Render.Document(input, {
        		template: 'template:salesforce-business-metadata'        		
        	return blob.getString(); // return the html fragment as a string