<?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: Multiple property constraint in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/multiple-property-constraint/m-p/261114#M214244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If anyone had the same problem as me - I found out a solution to this problem. Actual Node can be injected to constraint from ComponentGenerator. Solution to this can be found on &lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/jbarmash/page/2/" rel="nofollow noopener noreferrer"&gt;Jean Barmash's blog&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My note to injecting constraint from ComponentGenerator is, that this works correctly only when ComponentGenerator is called before the constraint e.g. when user is editing properties. However constraint can be called without ComponentGenerator e. g. when accessing nodes and its properties from Javascript API. Then the Node is not injected (and old value of node from previous call can be set there).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it's vital to set internal node variable to null at every end of evaluateSingleValue, to avoid problems with old values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And check whether node is really set to any value and respond accordingly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2011 09:47:29 GMT</pubDate>
    <dc:creator>trakhan</dc:creator>
    <dc:date>2011-09-14T09:47:29Z</dc:date>
    <item>
      <title>Multiple property constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multiple-property-constraint/m-p/261113#M214243</link>
      <description>Hello everyone.I have content model with multiple specific properties. I need to create constraint (or another restriction) which will enforce uniqueness to some of my properties, so there will be no other two documents with the same property value. This is quite simple with utilizing lucene search</description>
      <pubDate>Thu, 28 Jul 2011 11:37:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multiple-property-constraint/m-p/261113#M214243</guid>
      <dc:creator>trakhan</dc:creator>
      <dc:date>2011-07-28T11:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple property constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multiple-property-constraint/m-p/261114#M214244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If anyone had the same problem as me - I found out a solution to this problem. Actual Node can be injected to constraint from ComponentGenerator. Solution to this can be found on &lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/jbarmash/page/2/" rel="nofollow noopener noreferrer"&gt;Jean Barmash's blog&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My note to injecting constraint from ComponentGenerator is, that this works correctly only when ComponentGenerator is called before the constraint e.g. when user is editing properties. However constraint can be called without ComponentGenerator e. g. when accessing nodes and its properties from Javascript API. Then the Node is not injected (and old value of node from previous call can be set there).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it's vital to set internal node variable to null at every end of evaluateSingleValue, to avoid problems with old values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And check whether node is really set to any value and respond accordingly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 09:47:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multiple-property-constraint/m-p/261114#M214244</guid>
      <dc:creator>trakhan</dc:creator>
      <dc:date>2011-09-14T09:47:29Z</dc:date>
    </item>
  </channel>
</rss>

