AEM::下拉选择未保存的值和复选框
我在页面属性中添加了一个新选项卡。该选项卡由多字段面板acs aem公用包组成。我正在尝试添加一个文本字段、一个下拉列表和一些复选框。问题是,当我选择下拉列表下的值并选中复选框时,一切看起来都很好,但当我再次打开页面属性时,这些值看起来并没有被保存。代码如下:AEM::下拉选择未保存的值和复选框,aem,Aem,我在页面属性中添加了一个新选项卡。该选项卡由多字段面板acs aem公用包组成。我正在尝试添加一个文本字段、一个下拉列表和一些复选框。问题是,当我选择下拉列表下的值并选中复选框时,一切看起来都很好,但当我再次打开页面属性时,这些值看起来并没有被保存。代码如下: <tab_xxxx_suppression xmlns:social="http://www.adobe.com/social/1.0" jcr:primaryType="cq:Panel" title="Suppression"&
<tab_xxxx_suppression xmlns:social="http://www.adobe.com/social/1.0" jcr:primaryType="cq:Panel" title="Suppression">
<items jcr:primaryType="cq:WidgetCollection">
<idsuppress jcr:primaryType="cq:Widget" fieldDescription="Press + to add more" fieldLabel="Configure ID card suppress" name="./idsuppress" width="1000" xtype="multifield">
<fieldConfig jcr:primaryType="cq:Widget" name="./fieldConfig" xtype="multifieldpanel">
<items jcr:primaryType="cq:WidgetCollection">
<providedValue jcr:primaryType="cq:Widget" allowBlank="false" fieldDescription="Please provide the value for option selected above" fieldLabel="Provide value here" key="providedValue" labelStyle="width:150px" name="./providedValue" xtype="textfield"/>
<selectList jcr:primaryType="cq:Widget" defaultValue="0" fieldLabel="Business Rules" name="./suppress" type="select" xtype="selection">
<options jcr:primaryType="cq:WidgetCollection">
<one jcr:primaryType="nt:unstructured" text="Vanity URL" value="Vanity"/>
<two jcr:primaryType="nt:unstructured" text="PV/RC" value="PVRC"/>
<three jcr:primaryType="nt:unstructured" text="SA/OI" value="SAOI"/>
<four jcr:primaryType="nt:unstructured" text="Market Type" value="Market"/>
<five jcr:primaryType="nt:unstructured" text="Product Code" value="Product"/>
<six jcr:primaryType="nt:unstructured" text="Div Code" value="Div"/>
<seven jcr:primaryType="nt:unstructured" text="State of Issue" value="State"/>
<eight jcr:primaryType="nt:unstructured" text="Government Program Code" value="Government"/>
</options>
</selectList>
<suppressOptions jcr:primaryType="cq:Widget" title="Selection Options" xtype="dialogfieldset">
<items jcr:primaryType="cq:WidgetCollection">
<whole jcr:primaryType="cq:Widget" fieldLabel="Suppress View ID Card Functionality" labelStyle="width:240px" name="./whole" type="checkbox" width="auto" xtype="selection"/>
<order jcr:primaryType="cq:Widget" fieldLabel="Suppress Order ID card Functionality" labelStyle="width:239px" name="./order" type="checkbox" width="auto" xtype="selection"/>
<view jcr:primaryType="cq:Widget" fieldLabel="Suppress View ID Card Functionality" labelStyle="width:238px" name="./view" type="checkbox" width="auto" xtype="selection"/>
</items>
</suppressOptions>
</items>
</fieldConfig>
</idsuppress>
</items>
</tab_xxxx_suppression>
我在我的环境中尝试了你的代码,我想我发现了一个或多个问题: 由于您将属性定义为多字段,因此它将存储为json对象。因此,每个项的属性都是json键。没有属性本身,您需要指定键属性而不是名称。 我不知道为什么fieldConfig不喜欢dialogfieldset,导致复选框被排除。 最后,下面的代码对我来说很好:
<idsuppress jcr:primaryType="cq:Widget" fieldDescription="Press + to add more"
fieldLabel="Configure ID card suppress" name="./idsuppress" width="1000"
xtype="multifield">
<fieldConfig jcr:primaryType="cq:Widget" xtype="multifieldpanel">
<items jcr:primaryType="cq:WidgetCollection">
<providedValue jcr:primaryType="cq:Widget"
allowBlank="false" fieldDescription="Please provide the value for option selected above"
fieldLabel="Provide value here" key="providedValue" labelStyle="width:150px"
name="./providedValue" xtype="textfield" />
<selectList jcr:primaryType="cq:Widget" defaultValue="0"
fieldLabel="Business Rules" key="suppress" type="select" xtype="selection">
<options jcr:primaryType="cq:WidgetCollection">
<one jcr:primaryType="nt:unstructured" text="Vanity URL"
value="Vanity" />
<two jcr:primaryType="nt:unstructured" text="PV/RC" value="PVRC" />
<three jcr:primaryType="nt:unstructured" text="SA/OI"
value="SAOI" />
<four jcr:primaryType="nt:unstructured" text="Market Type"
value="Market" />
<five jcr:primaryType="nt:unstructured" text="Product Code"
value="Product" />
<six jcr:primaryType="nt:unstructured" text="Div Code" value="Div" />
<seven jcr:primaryType="nt:unstructured" text="State of Issue"
value="State" />
<eight jcr:primaryType="nt:unstructured" text="Government Program Code"
value="Government" />
</options>
</selectList>
<whole jcr:primaryType="cq:Widget"
fieldLabel="Suppress View ID Card Functionality" labelStyle="width:240px"
key="whole" type="checkbox" width="auto" xtype="selection" />
<order jcr:primaryType="cq:Widget"
fieldLabel="Suppress Order ID card Functionality" labelStyle="width:239px"
key="order" type="checkbox" width="auto" xtype="selection" />
<view jcr:primaryType="cq:Widget" fieldLabel="Suppress View ID Card Functionality"
labelStyle="width:238px" key="view" type="checkbox" width="auto"
xtype="selection" />
</items>
</fieldConfig>
</idsuppress>
希望这对你有帮助