Solved! Go to Solution.
Timothy,
The sublayer tag is only for specifying a particular popup for a layer or a definitionexpression. Read more about what is supported as far as layers and what sublayers are for here:
http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m30000000p000000.htm
If you have a grouped layer in your MSD and publish that to ArcGIS Server than that grouped layer will be there and display just like it does in ArcMap when using my TOC widget. If you are wanting to add just certain layers of a map service then you need to look into the visiblelayers and definitionexpression
Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
Timothy,
No you can not have it like that and here is the reason. The whole map service (the MSD) gets a checkbox and label so that the whole map service can be turned on or off and then each layer gets a checkbox (grouped layer or normal layer) so that you can turn on or off those layers. So to get what you are after you would need to publish an MSD without the group layer that way you would have just the main checkbox named electrical and the two layers under it:
chkbox Electrical <-- name of Map Service
chkbox Handhole <-- nested under Electrical
chkbox Manhole <-- nested under Electrical
Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic: