Я пытаюсь добиться следующих результатов в AEM:
checkbox1 показывает / скрывает textfield1 и checkbox2. Checbox2 показывает / скрывает текстовое поле 2.
На данный момент я могу показать / скрыть текстовое поле1 и флажок2 с помощью приведенного ниже кода, но не могу сделать флажок2 показать / скрыть текстовое поле2:
<items jcr:primaryType="nt:unstructured">
<displayTextfield1
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
text="Display textfield1"
fieldDescription="Check to display textfield1"
name="./displayTextfield1"
uncheckedValue="{Boolean}false"
checked="{Boolean}false"
value="{Boolean}true"
granite:class="cq-dialog-showhide">
<granite:data
jcr:primaryType="nt:unstructured"
cq-dialog-showhide-target=".showhide-textfield1"
cq-msm-lockable="./displayTextfield1"/>
</displayTextfield1>
<displayTextfield1Hint
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/hidden"
name="./displayTextfield1@TypeHint"
value="Boolean" />
<textfield1PlaceHolder
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Place holder textfield1"
name="./textfield1PlaceHolder"
granite:class="showhide-textfield1">
<granite:data
jcr:primaryType="nt:unstructured"
cq-dialog-showhide-value="true"
cq-msm-lockable="./textfield1PlaceHolder"/>
</textfield1PlaceHolder>
<displayTextfield2
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
text="display textfield2"
name="./displayTextfield2"
uncheckedValue="{Boolean}false"
checked="{Boolean}false"
value="{Boolean}true"
granite:class="showhide-textfield1">
<granite:data
cq-dialog-showhide-target=".showhide-textfield2"
jcr:primaryType="nt:unstructured"
cq-dialog-showhide-value="true"
cq-msm-lockable="./displayTextfield2"/>
</displayTextfield2>
<displayTextfield2Hint
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/hidden"
name="./displayTextfield2@TypeHint"
value="Boolean" />
<displayTextfield2PlaceHolder
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="display Textfield2"
name="./displayTextfield2PlaceHolder"
granite:class="showhide-textfield2">
<granite:data
jcr:primaryType="nt:unstructured"
cq-dialog-showhide-value="true"
cq-msm-lockable="./displayTextfield2PlaceHolder"/>
</displayTextfield2PlaceHolder>
Может Вы помогаете мне с этим? Спасибо!