Dynamic Dialog - able to see secondary choice after first level is changed
Hello
I created a dynamic dialog based on the document (Adobe Experience Manager Help | Dynamically modifying an Adobe Experience Manager Touch UI Dialog). It seems to be functioning correctly for the most part. My issue is when I change the drop down from A to B the secondary selections that were set under A continue to be shown with the options for B. In the screen shots my choice is Areas of Interest, under which I select from the tags picker Topics:Labor&Employment/Employee Benefits. If I change the drop down to Entity Membership the prior choice remains visible. I would obviously like this to be hidden. I have been searching through the documentation to determine how to correct but cannot find the solution. Any assistance would be greatly appreciated.


<dynamicTab
jcr:primaryType="nt:unstructured"
jcr:title="Main"
sling:resourceType="granite/ui/components/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
<items jcr:primaryType="nt:unstructured">
<columns
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="Title"
name="./jcr:title"
required="{Boolean}true"/>
<populated-by
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
fieldDescription="Populate By"
fieldLabel="Populate By"
name="./populateBy"
class="cq-dialog-dropdown-showhide"
cq-dialog-dropdown-showhide-target=".aoi-em-up-hide-show"
required="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<up
jcr:primaryType="nt:unstructured"
text="User Profile"
value="up"/>
<aoi
jcr:primaryType="nt:unstructured"
text="Areas of Interest"
value="aoi"/>
<em
jcr:primaryType="nt:unstructured"
text="Entity Membership"
value="em"/>
</items>
</populated-by>
<user-profile-container
class="hide aoi-em-up-hide-show"
showhidetargetvalue="up"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container"
fieldDescription="User Profile Default">
<items jcr:primaryType="nt:unstructured">
<default-populated-by
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
fieldDescription="Pop"
fieldLabel="Fallback"
name="./fallbackPopulateBy"
class="cq-dialog-dropdown-showhide"
cq-dialog-dropdown-showhide-target=".fallback-profile-hide-show">
<items jcr:primaryType="nt:unstructured">
<aoi-default
jcr:primaryType="nt:unstructured"
text="Areas of Interest"
value="aoi-fallback"/>
<em-default
jcr:primaryType="nt:unstructured"
text="Entity Membership"
value="em-fallback"/>
</items>
</default-populated-by>
<default-area-of-interest
class="hide fallback-profile-hide-show"
showhidetargetvalue="aoi-fallback"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/common/tagspicker"
allowBulkEdit="{Boolean}false"
allowCreate="{Boolean}false"
name="./fallbackAreaOfInterestTag"
rootPath="/etc/tags/topics"/>
<default-entity-membership
class="hide fallback-profile-hide-show"
showhidetargetvalue="em-fallback"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/common/tagspicker"
allowBulkEdit="{Boolean}false"
allowCreate="{Boolean}false"
name="./fallbackPublishingEntityTag"
rootPath="/etc/tags/publishing_entity"/>
</items>
</user-profile-container>
<area-of-interest
class="hide aoi-em-up-hide-show"
showhidetargetvalue="aoi"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/common/tagspicker"
allowBulkEdit="{Boolean}false"
allowCreate="{Boolean}false"
name="./topicTag"
rootPath="/etc/tags/topics"/>
<entity-membership
class="hide aoi-em-up-hide-show"
showhidetargetvalue="em"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/common/tagspicker"
allowBulkEdit="{Boolean}false"
allowCreate="{Boolean}false"
name="./publishingEntityTag"
rootPath="/etc/tags/publishing_entity"/>
<linkLabel
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="CTA Label"
name="./linkLabel"/>
<linkLabelEmphasis
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="CTA Label Emphasis"
name="./linkLabelEmphasis"/>
<link
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
allowExternal="{Boolean}true"
allowNonExistingPath="{Boolean}false"
allowNonRootPath="{Boolean}true"
fieldLabel="CTA URL"
name="./link"
rootPath="/content/aba-cms-dotorg"
validation="aba.pathbrowser"/>
</items>
</columns>
</items>
</dynamicTab>
