<?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: Getting share hostname,port, context i javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/getting-share-hostname-port-context-i-javascript/m-p/250805#M203935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, that approach is however only available to webscripts. For this particular case, it is javascript for cifs desktop actions. It doesn't even have the root scoped objects like companyhome available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I resolved it by&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var companyhome = search.findNode("path", ['workspace','SpacesStore','app:company_home']);&lt;BR /&gt;var shareurlsetting = companyhome.childByNamePath('/Data Dictionary/Loftux/ShareUrl');&lt;BR /&gt;if(shareurlsetting!=null){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var servercontext = shareurlsetting.properties["title"];&lt;BR /&gt;}else{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var servercontext = "&lt;A href="http://localhost:8080/share" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/share&lt;/A&gt;"&lt;BR /&gt;}&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;/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;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;The object ShareUrl is just a content less file i space "Loftux", where I use title to store my setting. Note how I had to create my own companyhome object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Nov 2010 14:43:07 GMT</pubDate>
    <dc:creator>loftux</dc:creator>
    <dc:date>2010-11-08T14:43:07Z</dc:date>
    <item>
      <title>Getting share hostname,port, context i javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-share-hostname-port-context-i-javascript/m-p/250803#M203933</link>
      <description>(Maybe this post is better fitted in the Javascript API forum, but that subforum was locked for me)I have changed the CIFS javascript action __showDetails to link to Share instead. And that was a simple change (I can post how once it is complete).But I had to hard code the share server name, port an</description>
      <pubDate>Sun, 07 Nov 2010 14:43:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-share-hostname-port-context-i-javascript/m-p/250803#M203933</guid>
      <dc:creator>loftux</dc:creator>
      <dc:date>2010-11-07T14:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Getting share hostname,port, context i javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-share-hostname-port-context-i-javascript/m-p/250804#M203934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;An alternative approach would be to create a scoped config variable which is accessible from javascript and Freemarker.&amp;nbsp; See &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts#Global_and_Scoped_Config" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts#Global_and_Scoped_Config&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; In webscript-framework-config-custom.xml create your own section (don't use the tag &amp;lt;server&amp;gt; since it is reserved).&amp;nbsp; Try something like &amp;lt;shareserver&amp;gt;.&amp;nbsp; Use the generic access method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Nov 2010 14:00:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-share-hostname-port-context-i-javascript/m-p/250804#M203934</guid>
      <dc:creator>stevegreenbaum</dc:creator>
      <dc:date>2010-11-08T14:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting share hostname,port, context i javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-share-hostname-port-context-i-javascript/m-p/250805#M203935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, that approach is however only available to webscripts. For this particular case, it is javascript for cifs desktop actions. It doesn't even have the root scoped objects like companyhome available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I resolved it by&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var companyhome = search.findNode("path", ['workspace','SpacesStore','app:company_home']);&lt;BR /&gt;var shareurlsetting = companyhome.childByNamePath('/Data Dictionary/Loftux/ShareUrl');&lt;BR /&gt;if(shareurlsetting!=null){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var servercontext = shareurlsetting.properties["title"];&lt;BR /&gt;}else{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var servercontext = "&lt;A href="http://localhost:8080/share" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/share&lt;/A&gt;"&lt;BR /&gt;}&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;/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;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;The object ShareUrl is just a content less file i space "Loftux", where I use title to store my setting. Note how I had to create my own companyhome object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Nov 2010 14:43:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-share-hostname-port-context-i-javascript/m-p/250805#M203935</guid>
      <dc:creator>loftux</dc:creator>
      <dc:date>2010-11-08T14:43:07Z</dc:date>
    </item>
  </channel>
</rss>

