我的对话框中有3个复选框小部件,并且在没有选择代码的情况下执行逻辑,问题是当我勾选option1选项2时,它们在内容节点中将它们的值设置为"ON".但是如果我编辑相同的组件option1,则选择option2,我取消选择一个并单击ok,仍然在内容节点属性中存在值为"ON"的情况.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Dialog"
title="dialog"
xtype="dialog">
<items
jcr:primaryType="cq:Widget"
xtype="tabpanel">
<items jcr:primaryType="cq:WidgetCollection">
<tab1
jcr:primaryType="cq:Panel"
title="Select Options">
<items jcr:primaryType="cq:WidgetCollection">
<facebook
jcr:primaryType="cq:Widget"
fieldLabel="Facebook"
name="./facebook"
xtype="checkbox"/>
<twitter
jcr:primaryType="cq:Widget"
fieldLabel="Twitter"
name="./twitter"
xtype="checkbox"/>
<linkedin
jcr:primaryType="cq:Widget"
fieldLabel="Linkedin"
name="./linkedin"
xtype="checkbox"/>
</items>
</tab1>
</items>
</items>
</jcr:root>
Run Code Online (Sandbox Code Playgroud)
我对checkboxxtype 没有太大的成功.相反,尝试selectionxtype,类型为checkbox.
<facebook
jcr:primaryType="cq:Widget"
fieldLabel="Facebook"
name="./facebook"
type="checkbox"
xtype="selection"/>
Run Code Online (Sandbox Code Playgroud)