<?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: Where to programmatically create Layer Objects in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76538#M2602</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was actually able to complete this programmatically.&amp;nbsp; By populating the config.xml, dynamically based on user based attributes you can then send encrypted usernames and passwords to each user.&amp;nbsp; Then by decrypting the usernames and passwords you can poll each layer in the list for its token based on those decrypted user names and passwords.&amp;nbsp; I then would have the ConfigManager.as read this list instead of its default, which was also provided in case of any communication failure.&amp;nbsp; I can see how this may be slightly different then what the standard developer would have to do but my motto is if there is a problem then there is a programmatic solution.&amp;nbsp; It took just a few alterations and programming "know-how" to complete and once I finalize this project I would be delighted to share it with the community, as I have now completed this in both Flex and Javascript API's.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 May 2014 13:29:26 GMT</pubDate>
    <dc:creator>StephanieFitzgerald</dc:creator>
    <dc:date>2014-05-27T13:29:26Z</dc:date>
    <item>
      <title>Where to programmatically create Layer Objects</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76535#M2599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, I am trying to read several layers from a database and populate the layer list from a list of layers.&amp;nbsp; Each layer has a different username and password for token generation.&amp;nbsp; I do not wish to have the user enter 50 passwords at launch of the flex app and I do not wish to reconfigure the server to not require each from having individual usernames and passwords.&amp;nbsp;&amp;nbsp; I am trying to figure out how to manually create the layers by reading from a generated xml file, not the config.xml but an xml generated from our database, that contains all of the attribute of the layer object.&amp;nbsp; And allows the Layerlist to login and receive the layers token, without hard coding the token, the userid, or the password.&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 21:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76535#M2599</guid>
      <dc:creator>StephanieFitzgerald</dc:creator>
      <dc:date>2014-05-16T21:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Where to programmatically create Layer Objects</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76536#M2600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I have accessed the xml to dynamically alter it based on a passed Jason object.&amp;nbsp; I have also implemented a httpservice to dynamically request a token.&amp;nbsp; The only issue I am having now is that the token does not appear to get passed in time to update the xml before load.&amp;nbsp; I can display an alert but it still does not get passed over.&amp;nbsp; In other languages I have done a while to pause to program processing while waiting for the token but that just seems to stop the drawing of the webmap.&amp;nbsp; Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:17:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76536#M2600</guid>
      <dc:creator>StephanieFitzgerald</dc:creator>
      <dc:date>2014-05-23T14:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Where to programmatically create Layer Objects</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76537#M2601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stephanie,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Your requirements and workflow are not very normal, so you will be hard pressed to get to much help. But what I can say is that if all you need to to have certain services use a specific username and password than all you need to do is setup a proxy service (the newer on that supports many new options) found here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://github.com/Esri/resource-proxy" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/Esri/resource-proxy&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using this new proxy you can do many things that were not possible before. You can specify a service or simply a server root url and the password and user that will be used when accessing this service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;serverUrl url="http://gislap183:6080" username="user1" password="Pa$$w0rd"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; matchAll="true"/&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:57:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76537#M2601</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T22:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Where to programmatically create Layer Objects</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76538#M2602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was actually able to complete this programmatically.&amp;nbsp; By populating the config.xml, dynamically based on user based attributes you can then send encrypted usernames and passwords to each user.&amp;nbsp; Then by decrypting the usernames and passwords you can poll each layer in the list for its token based on those decrypted user names and passwords.&amp;nbsp; I then would have the ConfigManager.as read this list instead of its default, which was also provided in case of any communication failure.&amp;nbsp; I can see how this may be slightly different then what the standard developer would have to do but my motto is if there is a problem then there is a programmatic solution.&amp;nbsp; It took just a few alterations and programming "know-how" to complete and once I finalize this project I would be delighted to share it with the community, as I have now completed this in both Flex and Javascript API's.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 13:29:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/where-to-programmatically-create-layer-objects/m-p/76538#M2602</guid>
      <dc:creator>StephanieFitzgerald</dc:creator>
      <dc:date>2014-05-27T13:29:26Z</dc:date>
    </item>
  </channel>
</rss>

