<?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: Associations and Javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201840#M154970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's great.&amp;nbsp; I thought about the toString approach after I wrote the post and thought it might cause trouble as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Building a new String object and then doing the compare is a better solution!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Feb 2009 12:47:53 GMT</pubDate>
    <dc:creator>uzi</dc:creator>
    <dc:date>2009-02-13T12:47:53Z</dc:date>
    <item>
      <title>Associations and Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201837#M154967</link>
      <description>I am trying to create multiple associations (signatures of customers placed in a space named 'Signatures') to a document using javascript…Here is the code:var docname = document.name.substring(0, document.name.lastIndexOf('_'));var len = docname.length();var docs = search.luceneSearch("PATH:\"/app:c</description>
      <pubDate>Fri, 13 Feb 2009 07:17:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201837#M154967</guid>
      <dc:creator>sbsrulz</dc:creator>
      <dc:date>2009-02-13T07:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Associations and Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201838#M154968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may have hit on one of the interesting quirks about working with Java objects in JavaScript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In JavaScript, you can test for string equality using the == and != operators.&amp;nbsp; This compares the values of the strings and everything works really nicely between two JavaScript strings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Java, as you know, you cannot use == or != since that's performing a comparison between the object instances (which could have the same value but which could be entirely different objects).&amp;nbsp; Java has different mechanism for this and provides .equals() as a means for comparing two objects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In looking at your code, it seems possible that you're comparing a JavaScript string with a Java string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A better means of comparison maybe to call toString() on the objects and then compare those results.&amp;nbsp; Check for null ahead of time of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 10:28:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201838#M154968</guid>
      <dc:creator>uzi</dc:creator>
      <dc:date>2009-02-13T10:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Associations and Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201839#M154969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well thanks… I had completely forgotten about it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, the .toString() didnt work but I tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if (String(docname) == String(docname1))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and got it working &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 11:12:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201839#M154969</guid>
      <dc:creator>sbsrulz</dc:creator>
      <dc:date>2009-02-13T11:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Associations and Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201840#M154970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's great.&amp;nbsp; I thought about the toString approach after I wrote the post and thought it might cause trouble as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Building a new String object and then doing the compare is a better solution!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 12:47:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/associations-and-javascript/m-p/201840#M154970</guid>
      <dc:creator>uzi</dc:creator>
      <dc:date>2009-02-13T12:47:53Z</dc:date>
    </item>
  </channel>
</rss>

