<?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: JavaScript commands ignore if wrongly placed in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70758#M45724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for reporting this, i'll take a look.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Sep 2006 15:53:08 GMT</pubDate>
    <dc:creator>kevinr</dc:creator>
    <dc:date>2006-09-04T15:53:08Z</dc:date>
    <item>
      <title>JavaScript commands ignore if wrongly placed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70757#M45723</link>
      <description>Hi,I ran into a small bug (if I'm not mistaken) in the JavaScript API. I tried to change the name of my copied document but if you place the copy.name command above the if statement the copied document keeps the original name. If you place it right before the copy.safe command everything works. Can</description>
      <pubDate>Mon, 04 Sep 2006 13:04:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70757#M45723</guid>
      <dc:creator>simon</dc:creator>
      <dc:date>2006-09-04T13:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript commands ignore if wrongly placed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70758#M45724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for reporting this, i'll take a look.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 15:53:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70758#M45724</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-09-04T15:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript commands ignore if wrongly placed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70759#M45725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK I know why this is - it's a "feature" that i'll need to document so you can work around it as you have done in your example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Most of the Node operations cause any cached values or values that have not yet been set (e.g. properties) to be reset. So the addAspect() method will cause the properties collection to be cleared on the assumption that adding the aspect has "changed" the node. Therefore you need to save() your properties immediately after setting them i.e. before performing any other operations such as copy/move/addaspect etc. In your case it is more subtle because the node.name property is really just a shortcut to node.properties.name - so it is not obvious that a property has been modified when you change the name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It may be better for me to force a save() operation when you set .name directly using the shortcut, but we don't want to set every property after each property.x=y call as this would give weaker performance which is why the .save() method exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 17:02:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70759#M45725</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-09-04T17:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript commands ignore if wrongly placed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70760#M45726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the fast reply Kevin. The workaround works fine but all these small annoyances cost some time to find out why some code isn't working. Hope these will disappear when Alfresco gets more "mature".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 07:34:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-commands-ignore-if-wrongly-placed/m-p/70760#M45726</guid>
      <dc:creator>simon</dc:creator>
      <dc:date>2006-09-05T07:34:54Z</dc:date>
    </item>
  </channel>
</rss>

