All, in my ftl file, I'm trying to grab a small piece of content thru the ContentWorker renderContentAsTextCache method. I found an example where this sort of thing is being done in applications/ content/webapp/content/cms/CMSContentEdit.ftl , but when I follow that style I get an error.

Here is how it is done in that file:

<#assign currentTextData=Static ["org.ofbiz.content.data.DataResourceWorker"].renderDataResourceAsTextCa che(delegator, dataResourceId, (Map)null, (GenericValue)null, (Locale) null, (String)null) />

Here is how I do it:

<#assign textdata = Static ["org.ofbiz.content.content.ContentWorker"].renderContentAsTextCache (delegator, contentId, (Map)null, (GenericValue)null, (Locale)null, "text/html")>

I am getting an error that is slightly unexplainable:

freemarker.template.TemplateModelException: No signature of method renderContentAsTextCache accepts 9 arguments

So, when I remove the casting of the nulls, and the signature look like this:

<#assign textdata = Static ["org.ofbiz.content.content.ContentWorker"].renderContentAsTextCache (delegator, contentId, null, null, null, "text/html")>

I no longer get that error - I get the following error:

freemarker.template.TemplateModelException: No signature of method renderContentAsTextCache matches (org.ofbiz.entity.GenericDelegator,java.lang.String,org.ofbiz.entity.Gen ericEntity$NullField,org.ofbiz.entity.GenericEntity $NullField,org.ofbiz.entity.GenericEntity$NullField,java.lang.String)

Does anyone have any insight on this one?

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to