Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

Dynamically Change UI (Config or Somewhere Else?)

$
0
0
Hello,

I am trying to find a way to dynamically switch the UI dependent on user action. For instance, the user will have the ability to select which type of sub-application they would like to use, and that would then tell Flex Viewer to change its colors, and load in different widgets, etc. This idea would preferably not refresh the browser, but rather bubble up and redraw the UI accordingly.

I have been looking into the event structure for loading in the configdata, but I have been unable to track down exactly where it is set except here:

Code:

private function setConfigFile():void
            {
                //retrieve FlashVars.
                var flashvarConfig:String = FlexGlobals.topLevelApplication.parameters.config;
                if (flashvarConfig)
                {
                    configFile = flashvarConfig;
                }

                //retrieve config from URL and override FlashVar
                if (urlConfigParams.config)
                {
                    configFile = urlConfigParams.config;
                }
            }

Which is fine, I can always make this public, and manually populate it. However, I am unaware of what AppEvent dispatch to call to get the UI to redraw.

I am completely willing to rewrite things, just need to know where to look. Thanks!

P.S. I am using Viewer 3.6 as a base and Flex 4.11.0

Viewing all articles
Browse latest Browse all 2097

Trending Articles