<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Problem with Application Scope</title>
    <link>https://forums.adobe.com/community/coldfusion/coldfusion_advanced?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Mon, 11 Aug 2014 01:12:12 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-08-11T01:12:12Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Problem with Application Scope</title>
      <link>https://forums.adobe.com/message/6627973?tstart=0#6627973</link>
      <description>&lt;!-- [DocumentBodyStart:b6c6ac5d-6462-40a3-893b-fe6dadb92e15] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I'm assuming everything is being set in ApplicationStart... so why not simply call ApplicationStart on refresh... why do the stop?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:b6c6ac5d-6462-40a3-893b-fe6dadb92e15] --&gt;&lt;img src='/beacon?t=1415919160118' /&gt;</description>
      <pubDate>Mon, 11 Aug 2014 01:12:12 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6627973?tstart=0#6627973</guid>
      <dc:date>2014-08-11T01:12:12Z</dc:date>
      <clearspace:dateToText>3 months 4 days ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with Application Scope</title>
      <link>https://forums.adobe.com/message/6600480?tstart=0#6600480</link>
      <description>&lt;!-- [DocumentBodyStart:cd9bfc82-02c7-4d8b-bd73-c1b8eaf89e15] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;The relevant code to show us is where you set the value of &lt;em&gt;session.locale&lt;/em&gt;. I am also curious to know how you 'refresh the application scope' in applicationStop().&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:cd9bfc82-02c7-4d8b-bd73-c1b8eaf89e15] --&gt;</description>
      <pubDate>Thu, 31 Jul 2014 13:46:00 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6600480?tstart=0#6600480</guid>
      <dc:date>2014-07-31T13:46:00Z</dc:date>
      <clearspace:dateToText>3 months 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Problem with Application Scope</title>
      <link>https://forums.adobe.com/message/6592150?tstart=0#6592150</link>
      <description>&lt;!-- [DocumentBodyStart:72befd24-9526-407e-841a-00e1862ce66a] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p style="color: #222222; font-family: arial, sans-serif;"&gt;We use&lt;span style="font-size: 10pt; line-height: 1.5em;"&gt; dynamic text on our websites.&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The dynamic text available in different languages is stored in structures in the Application scope.&amp;nbsp; Each resource bundle has its own variable to store its variables.&amp;nbsp; They can be called using the following format: &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;#Application.StructName[Session.&lt;strong&gt;locale&lt;/strong&gt;].Variable#&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The first part is the name of the structure variable. With brackets, the variable for the locale is passed in, specifying which part of the structure to use. The last part is the specific variable within the resource bundle to use. &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If we add new variables in the Application Scope will not be immediately seen.&amp;nbsp; &lt;br/&gt; &lt;br/&gt;The application scope can easily be refreshed by calling any page in the website and adding &amp;#8220;refresh&amp;rdquo; as a variable in the URL.&amp;nbsp; &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This is the Application.cfc function to refresh the application scope:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cffunction name="onRequestStart"&amp;gt; &lt;br/&gt;&amp;lt;cfargument name="requestname" required=true /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--- restart application scope ---&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfif structKeyExists(url,"refresh")&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfset applicationStop()&amp;gt;&amp;nbsp;&amp;nbsp; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/cfif&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br/&gt;&amp;lt;/cffunction&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We have a problem on one of our site. &lt;/p&gt;&lt;p&gt;When we call any page with 'refresh' url the site goes down, it says 'Locale is undefined in Session...', ONLY for one of our sites. It does not happen with other sites.&lt;/p&gt;&lt;p style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;That is driving us crazy.&lt;/span&gt;&lt;/p&gt;&lt;p style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #222222; font-family: arial, sans-serif;"&gt;Is there some cold fusion specialist that can sense in which direction to move to try to resolve the problem?&lt;/span&gt;&lt;/p&gt;&lt;p style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;Thank you for your help.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:72befd24-9526-407e-841a-00e1862ce66a] --&gt;</description>
      <pubDate>Mon, 28 Jul 2014 22:23:24 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6592150?tstart=0#6592150</guid>
      <dc:date>2014-07-28T22:23:24Z</dc:date>
      <clearspace:dateToText>3 months 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

