我想知道如何使用 javascript在Touch UI 对话框中由作者从给定下拉列表中获取选定值以进行进一步操作。
下面是我的对话框结构
<?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>
在这里,我想在我的 Javascript 中获取 ./allowed (dropdown) 的对话框属性值。
先感谢您。