Hi,I try to develop a custom action, and I need to acces the content of a node from this action. So I try to use the content Service, butwhen I launch Alfresco, I have this error :"17:04:40,500 ERROR [org.springframework.web.context.ContextLoader] Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testPDF' defined in file [F:\Alfresco2.1\tomcat\shared\classes\alfresco\extension\testPDF-context.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'contentService' of bean class [testPDF.testPDFAction]: Bean property 'contentService' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?"I suppose that it is possible to use the contentService from an action, I must be missing something.My bean is declared like this :<beans>
<!– testPDF Action Bean –>
<bean id="testPDF" class="testPDF.testPDFAction" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService"></ref>
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
</bean>
<!– Load the Logger Action Messages –>
<bean id="testPDF-action-messages" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>testPDF.testPDF-action-messages</value>
</list>
</property>
</bean>
</beans>
public class generePDFAction extends ActionExecuterAbstractBase
{
/** Mon logger */
private static Log logger = LogFactory.getLog("org.alfresco.testPDF");
private ContentService contentService;
private NodeService nodeService;
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
public void setContentService(ContentService contentService)
{
this.contentService = contentService;
}
@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{
//do some stuff
}