<?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: Need to resolve multiple calls for same web service in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279079#M232209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what kind of calls are you making? As long as you are making GET requests with the exact same URL from different component web scripts there is already some caching going on under the covers as long as you use the RequestCachingRemoteConnector (which is the default for the "alfresco" connector in Alfresco Share). If using a different part of the feed results in different URLs for the remote calls, then you might want to try generalizing the requests so that they can get their data from one common request and each perform the same type of request, no matter which is rendered first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Feb 2013 14:14:32 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2013-02-17T14:14:32Z</dc:date>
    <item>
      <title>Need to resolve multiple calls for same web service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279078#M232208</link>
      <description>I have page consisting of five regions. Three regions were designed for three webscripts but those webscripts all call one service to return json feeds but use different part of feed. You might be wondering why they are not merged as one component. But I can't since they render in very complex order</description>
      <pubDate>Fri, 15 Feb 2013 23:46:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279078#M232208</guid>
      <dc:creator>qsdmv</dc:creator>
      <dc:date>2013-02-15T23:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need to resolve multiple calls for same web service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279079#M232209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what kind of calls are you making? As long as you are making GET requests with the exact same URL from different component web scripts there is already some caching going on under the covers as long as you use the RequestCachingRemoteConnector (which is the default for the "alfresco" connector in Alfresco Share). If using a different part of the feed results in different URLs for the remote calls, then you might want to try generalizing the requests so that they can get their data from one common request and each perform the same type of request, no matter which is rendered first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 14:14:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279079#M232209</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-02-17T14:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need to resolve multiple calls for same web service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279080#M232210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First of all, thank you so much for your comments. Here is the example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let us say that I have two components. I have defined two js files. One with the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var profile = eval('(' + service.getProfile(name) + ')');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model.lastName = profile["lastName"];&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;Another one is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var profile = eval('(' + service.getProfile(name) + ')');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model.firstName = profile["firstName"];&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;BR /&gt;&lt;SPAN&gt;I don't want: var profile = eval('(' + service.getProfile(name) + ')'); called many times (inside this service, it processes the complex logic and need to access outside URL. As we know, this variable "profile" only is available to specific component. How could we share this variable. This example doesn't demonstrate the complexities. I could create another interceptor so that I can save this object and share with all of pages but this is not what I want. I am trying to find the best way. I am using Surf but not Share.&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>Tue, 19 Feb 2013 16:54:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279080#M232210</guid>
      <dc:creator>qsdmv</dc:creator>
      <dc:date>2013-02-19T16:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need to resolve multiple calls for same web service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279081#M232211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in pure Surf you should be able to manually cache / interchange objects between components using the RequestContext, which is available in JavaScript controllers as a ScriptRenderContext under the root-scope variable "context". Simply using &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;context.setValue("profile", profile)&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; and &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var profile = context.properties["profile"]&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; should suffice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 16:23:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/need-to-resolve-multiple-calls-for-same-web-service/m-p/279081#M232211</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-02-21T16:23:34Z</dc:date>
    </item>
  </channel>
</rss>

