我想創建一個基於標籤的觸摸UI對話框AEM(AEM-6.2)但我面臨的問題隱藏標籤。AEM - 觸摸UI對話框隱藏和顯示下拉選擇標籤
我在對話框中有3個選項卡。
- 一般(始終啓用)
- 運動(啓用只有當選擇運動)
- 電影(啓用僅在選擇電影)
配置之前, '體育' 和'電影'選項卡被隱藏。在「常規」選項卡中,我有一個選擇框「選擇運動」和「選擇電影」。在選擇相應的選項卡應顯示。我嘗試使用下面給出的路徑中提供的步驟,但無法隱藏選項卡。
路徑: /libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js
其他參考我們嘗試:https://github.com/aman02deep/aem-6.2/blob/master/tabshideshow.js
內容.xml文件:
</items>
</selection>
</items>
</columns>
</items>
</generalPanel>
<sports
jcr:primaryType="nt:unstructured"
jcr:title="Sports"
sling:resourceType="granite/ui/components/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
margin="{Boolean}false"/>
<items jcr:primaryType="nt:unstructured">
<columns
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<sptext jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textarea"
fieldLabel="enter the text :"
name="./sp_text"
required="false"/>
</items>
</columns>
</items>
</sports>
<movies
jcr:primaryType="nt:unstructured"
jcr:title="Movies"
sling:resourceType="granite/ui/components/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
margin="{Boolean}false"/>
<items jcr:primaryType="nt:unstructured">
<columns
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<mvtext jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textarea"
fieldLabel="enter the text :"
name="./mv_text"
required="false"/>
</items>
</columns>
</items>
</movies>
</items>
</content>
謝謝你的答覆。 我嘗試添加花崗岩:數據到目標選項卡,並使用隱藏顯示腳本中的smilar偵聽器實現。它仍然不是基於選擇隱藏的。 – RAN
1.花崗岩:數據在DOM中添加數據屬性? 2.你能找到你的元素使用jquery來找到特定的自定義數據屬性? –