<?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 numberformatter within an inforenderer? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/numberformatter-within-an-inforenderer/m-p/170028#M3979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an inforenderer set up to be called as a click function on my map and open an infowindow.&amp;nbsp; This works fine, but some of the data I'm calling are numbers.&amp;nbsp; I'd like to be able to format the numbers with commas, but I'm having trouble calling the number formatter from within my inforenderer component.&amp;nbsp; I'm getting an error "Access of undefined property gridFormatter".&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The definition for the number formatter is &amp;lt;mx:NumberFormatter id="gridFormatter" useThousandsSeparator="true" thousandsSeparatorTo="," precision="0" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to call it within this section of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Component className="MyCountyWindowRenderer"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:VBox verticalGap="-5"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;infoClasses:InfoWindowLabel styleName="myInfoTitle" text="{data.NAME2}" width="150%"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text='Total Children under 72 Months: {data.POPULATION}' /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text="{gridFormatter.format(data.POPULATION)}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Number Tested:&amp;nbsp; {data.TESTOUTCOME}" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Age 0-35 Months Tested:&amp;nbsp; {data.TEST_0_35}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Age 36-71 Months Tested:&amp;nbsp; {data.TEST_36_71}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Number Elevated:&amp;nbsp; {data.ELEVATED}" /&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Test Rates per 1000:&amp;nbsp; {data.RATE}" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:VBox&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:Component&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The line &amp;lt;mx:Label text='Total Children under 72 Months: {data.POPULATION}' /&amp;gt; is how it appears now.&amp;nbsp; The line right below is just my test to see if I can call the formatter at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like the component is getting built before FLEX knows the numberformatter exists.&amp;nbsp; I don't know if that's what's happening and if so, if there is a way to change the order so that the number formatter exists before the component tries to call it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Sep 2010 20:49:46 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2010-09-09T20:49:46Z</dc:date>
    <item>
      <title>numberformatter within an inforenderer?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/numberformatter-within-an-inforenderer/m-p/170028#M3979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an inforenderer set up to be called as a click function on my map and open an infowindow.&amp;nbsp; This works fine, but some of the data I'm calling are numbers.&amp;nbsp; I'd like to be able to format the numbers with commas, but I'm having trouble calling the number formatter from within my inforenderer component.&amp;nbsp; I'm getting an error "Access of undefined property gridFormatter".&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The definition for the number formatter is &amp;lt;mx:NumberFormatter id="gridFormatter" useThousandsSeparator="true" thousandsSeparatorTo="," precision="0" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to call it within this section of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Component className="MyCountyWindowRenderer"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:VBox verticalGap="-5"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;infoClasses:InfoWindowLabel styleName="myInfoTitle" text="{data.NAME2}" width="150%"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text='Total Children under 72 Months: {data.POPULATION}' /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text="{gridFormatter.format(data.POPULATION)}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Number Tested:&amp;nbsp; {data.TESTOUTCOME}" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Age 0-35 Months Tested:&amp;nbsp; {data.TEST_0_35}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Age 36-71 Months Tested:&amp;nbsp; {data.TEST_36_71}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Number Elevated:&amp;nbsp; {data.ELEVATED}" /&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Test Rates per 1000:&amp;nbsp; {data.RATE}" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:VBox&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:Component&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The line &amp;lt;mx:Label text='Total Children under 72 Months: {data.POPULATION}' /&amp;gt; is how it appears now.&amp;nbsp; The line right below is just my test to see if I can call the formatter at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like the component is getting built before FLEX knows the numberformatter exists.&amp;nbsp; I don't know if that's what's happening and if so, if there is a way to change the order so that the number formatter exists before the component tries to call it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 20:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/numberformatter-within-an-inforenderer/m-p/170028#M3979</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2010-09-09T20:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: numberformatter within an inforenderer?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/numberformatter-within-an-inforenderer/m-p/170029#M3980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tracy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The formatter has to declared inside the Component. A component basically creates it own memory space and cannot reference things out side of itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 20:53:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/numberformatter-within-an-inforenderer/m-p/170029#M3980</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-09-09T20:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: numberformatter within an inforenderer?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/numberformatter-within-an-inforenderer/m-p/170030#M3981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Got it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So this worked:&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Component className="MyCountyWindowRenderer"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:VBox verticalGap="-5"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;infoClasses:InfoWindowLabel styleName="myInfoTitle" text="{data.NAME2}" width="150%"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text='Total Children under 72 Months: {data.POPULATION}' /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:NumberFormatter id="labelFormatter" useThousandsSeparator="true" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text="{labelFormatter.format(data.POPULATION)}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Number Tested:&amp;nbsp; {data.TESTOUTCOME}" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Age 0-35 Months Tested:&amp;nbsp; {data.TEST_0_35}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Age 36-71 Months Tested:&amp;nbsp; {data.TEST_36_71}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Number Elevated:&amp;nbsp; {data.ELEVATED}" /&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Label text=&amp;nbsp; "Test Rates per 1000:&amp;nbsp; {data.RATE}" /&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:VBox&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/mx:Component&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 21:02:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/numberformatter-within-an-inforenderer/m-p/170030#M3981</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2010-09-09T21:02:46Z</dc:date>
    </item>
  </channel>
</rss>

