0
我想知道如何從作者在給定的下拉列表中獲取選定值觸摸UI對話框使用javascript進行進一步操作。獲取由JavaScript中作者[AEM]選擇的對話框屬性值
下面是我的javascript我對話框結構
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/tabs"
type="nav"/>
<items jcr:primaryType="nt:unstructured">
<General
jcr:primaryType="nt:unstructured"
jcr:title="General Questions"
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">
<allowed-selections
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
fieldLabel="Allowed Selections"
name="./allowed">
<items jcr:primaryType="nt:unstructured">
<one
jcr:primaryType="nt:unstructured"
text="One"
value="one"/>
<two
jcr:primaryType="nt:unstructured"
text="Two"
value="two"/>
<three
jcr:primaryType="nt:unstructured"
text="Three"
value="three"/>
<four
jcr:primaryType="nt:unstructured"
text="Four"
value="four"/>
</items>
</allowed-selections>
<description/>
<selection-text
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="Selection Text"
name="./selectiontext"/>
</items>
</columns>
</items>
</General>
</items>
</content>
</jcr:root>
在這裏,我想取./allowed(下拉)的對話框屬性值。
預先感謝您。
我不確定將來其他人的絕對路徑是否會有用。您應該對解決方案進行一些擴展,以便以一般方式進行理解。 – jdv
當然。我指的是我們擁有這個文件的默認位置。我將用更多的輸入來更新解決方案 – sherry
我保證你在路上的某個人不會在這個位置有這個文件,這使得這個答案對他人不太有用。更不用說這個位置只是某些平臺的默認設置。請參閱:https://stackoverflow.com/help/how-to-answer – jdv