<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Access a property of type d:content in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252580#M205710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Finally, the problem comes from : org.alfresco.repo.forms.processor.node.ContentModelFormProcessor.processPropertyPersist()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the property is of type cm:content, processContentPropertyPersist is called :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;else if (propDef.getDataType().getName().equals(DataTypeDefinition.CONTENT))&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processContentPropertyPersist(nodeRef, fieldData, propsToPersist, data);&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;And in processContentPropertyPersist(), a writer is opened on the current node :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;this.contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;But there is no use of the QName of the property calculated in processPropertyPersist(…)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;String qNamePrefix = m.group(1);&lt;BR /&gt;String localName = m.group(2);&lt;BR /&gt;QName fullQName = QName.createQName(qNamePrefix, localName, namespaceService);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;So every property of type d:content is saved at the same place despite the QName of the property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, I've used a property d:text instead of d:content, and it's correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope it's clear….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Laurent&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Apr 2011 09:26:08 GMT</pubDate>
    <dc:creator>laurent1050</dc:creator>
    <dc:date>2011-04-20T09:26:08Z</dc:date>
    <item>
      <title>Access a property of type d:content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252578#M205708</link>
      <description>Hi,I've created an aspect with a property of type d:content.I've applyed this aspect to all my folders, and I'm now able in Share to add an html description to all my folders. Great !&amp;lt;aspect name="poste:descriptionable"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;title&amp;gt;Rich description of a folder&amp;lt;/title&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;propertie</description>
      <pubDate>Tue, 12 Apr 2011 10:15:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252578#M205708</guid>
      <dc:creator>laurent1050</dc:creator>
      <dc:date>2011-04-12T10:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Access a property of type d:content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252579#M205709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${desc.content} return ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${desc.url} return "&lt;/SPAN&gt;&lt;A href="http://localhost:8080/alfresco/d/d/workspace/SpacesStore/47fd50fd-074c-443a-8523-ae654da5f4a4/20110411%20-%2009h51?property={http://www.serviss-h.log.intra.laposte.fr/richFolder/1.0}richDescription" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/d/d/workspace/SpacesStore/47fd50fd-074c-443a-8523-ae654da5f4a4/20110411%20-%2009h51?property={http://www.serviss-h.log.intra.laposte.fr/richFolder/1.0}richDescription&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This url return in FireFox&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;The node's content is missing: &lt;BR /&gt;&amp;nbsp;&amp;nbsp; node: workspace://SpacesStore/47fd50fd-074c-443a-8523-ae654da5f4a4 &lt;BR /&gt;&amp;nbsp;&amp;nbsp; reader: null&amp;nbsp; &lt;BR /&gt;Please contact your system administrator.&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I've now tried "&lt;/SPAN&gt;&lt;A href="http://localhost:8080/alfresco/d/d/workspace/SpacesStore/47fd50fd-074c-443a-8523-ae654da5f4a4/20110411%20-%2009h51" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/d/d/workspace/SpacesStore/47fd50fd-074c-443a-8523-ae654da5f4a4/20110411%20-%2009h51&lt;/A&gt;&lt;SPAN&gt;" in FireFox and I get the content of my property poste:richDescription&amp;nbsp; :shock: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my webscript became&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var currentFolder = search.findNode(currentNode);&lt;BR /&gt;if (currentFolder.hasAspect("poste:descriptionable")) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;model.desc = currentFolder.content;&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But what will happened if I've two properties of type d:content for on the same folder ????&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 15:00:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252579#M205709</guid>
      <dc:creator>laurent1050</dc:creator>
      <dc:date>2011-04-12T15:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Access a property of type d:content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252580#M205710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Finally, the problem comes from : org.alfresco.repo.forms.processor.node.ContentModelFormProcessor.processPropertyPersist()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the property is of type cm:content, processContentPropertyPersist is called :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;else if (propDef.getDataType().getName().equals(DataTypeDefinition.CONTENT))&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processContentPropertyPersist(nodeRef, fieldData, propsToPersist, data);&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;And in processContentPropertyPersist(), a writer is opened on the current node :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;this.contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;But there is no use of the QName of the property calculated in processPropertyPersist(…)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;String qNamePrefix = m.group(1);&lt;BR /&gt;String localName = m.group(2);&lt;BR /&gt;QName fullQName = QName.createQName(qNamePrefix, localName, namespaceService);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;So every property of type d:content is saved at the same place despite the QName of the property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, I've used a property d:text instead of d:content, and it's correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope it's clear….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Laurent&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 09:26:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252580#M205710</guid>
      <dc:creator>laurent1050</dc:creator>
      <dc:date>2011-04-20T09:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Access a property of type d:content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252581#M205711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;laurent1050,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you ever try using the property type d:any?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm in a situation where I need to store more data than d:text will allow (apparently a constraint imposed by database implemented).&amp;nbsp; Tried d:content in vain.&amp;nbsp; Just about to give d:any a go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll let you know what I find.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 01:23:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/access-a-property-of-type-d-content/m-p/252581#M205711</guid>
      <dc:creator>benswitzer</dc:creator>
      <dc:date>2013-08-27T01:23:32Z</dc:date>
    </item>
  </channel>
</rss>

