multiple configurations under one application

3375
7
Jump to solution
08-07-2015 03:56 PM
LefterisKoumis
Regular Contributor

In flex, I was able to host multiple configurations under the core application by using

index.html?config=myconfig.xml

So, different layers and tools would be loaded depending which xml was called.

Is there any way in web appbuilder to do a similar task?

To build an app that depending the url parameter (xml or ?) to attach the appropriate layers and tools.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
LefterisKoumis
Regular Contributor

Robert, just to verify of what I am thinking.

It will not work exactly how it was working with Flex. It takes an extra step.

If you are using the Local Layer widget where you define your own services along with the definition expressions, then:

- will be multiple "config_Local Layer Widget.json" files for every group of layers and definition expressions

- for every config.json file (config2.json, config3.json....) it will point to the appropriate (config_Local Layer Widget2.json, config_Local Layer Widget3.json,...)

In a word, since all widgets will be the same for every config, all config.json files will be identical, except the line that calls the configuration file for the Local Layer.

Please verify.  Thank you for all your help.

View solution in original post

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Lefteris,

   Sure it is identical to the way you did it in Flex. It is just a .json instead or .xml

http://yoursite/index.html?config=config2.json

DanielStoelb
Occasional Contributor III

Just out of curiosity, how would one make a widget that would allow the user to choose between configurations?

0 Kudos
LefterisKoumis
Regular Contributor

Robert, just to verify of what I am thinking.

It will not work exactly how it was working with Flex. It takes an extra step.

If you are using the Local Layer widget where you define your own services along with the definition expressions, then:

- will be multiple "config_Local Layer Widget.json" files for every group of layers and definition expressions

- for every config.json file (config2.json, config3.json....) it will point to the appropriate (config_Local Layer Widget2.json, config_Local Layer Widget3.json,...)

In a word, since all widgets will be the same for every config, all config.json files will be identical, except the line that calls the configuration file for the Local Layer.

Please verify.  Thank you for all your help.

View solution in original post

0 Kudos
DanielStoelb
Occasional Contributor III

Leferis,

That is how I've used it for my application.  The only difference between the config files is the config_Local Layer widget name/location.

LefterisKoumis
Regular Contributor

Bingo. Thanks.

0 Kudos
DanielStoelb
Occasional Contributor III

Also - as a side note, I've used a modification of the About widget and pre-coded in the href's for these configurations so as to have an "event switcher" functionality.  Each of these links have a specific url that they point to, following the rule of "config=configx.json".

0 Kudos
LefterisKoumis
Regular Contributor

I used a different approach. I created a combo box in the header widget then the users can switch to the different configs. Thanks.

0 Kudos