我一直在努力禁用内容并忽略填充在选择字段中的数据,该选择字段构成 CQ5 对话框附带的多字段的一部分
下面是不工作的代码
<medicineType
jcr:primaryType="cq:Widget"
fieldLabel="medicine Type : "
name="./medicinetype"
blankText="medicine Type"
type="radio"
xtype="selection">
<options jcr:primaryType="cq:WidgetCollection">
<inactive
jcr:primaryType="nt:unstructured"
text="medicine Lead"
value="medicinelead" />
<active
jcr:primaryType="nt:unstructured"
text="doctor Lead"
value="doctorlead" />
</options>
<listeners jcr:primaryType="nt:unstructured"
selectionchanged="function(box,value){
if(value == 'medicinelead'){
var ans = box.findParentByType('dialog').form.findField('./medicinedoctorset');
ans.setDisabled(true);
ans.getEl().up('.x-form-item').setDisplayed(false);
}
"/>
</medicineType>
<medicinedoctorset
fieldLabel="doctor cards"
jcr:primaryType="cq:Widget"
name="./medicinedoctorset"
xtype="multifield">
<fieldConfig
jcr:primaryType="cq:Widget"
type="select"
options="/apps/doctor-api/components/medicineview/doctorcards.json"
optionsRoot="doctorcards"
optionsTextField="label"
optionsValueField="id"
xtype="selection" />
</medicinedoctorset>