在CQ5中获取默认选中复选框 [英] Getting Default Checked Checkbox in CQ5

查看:91
本文介绍了在CQ5中获取默认选中复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在编辑时在组件对话框上选中默认复选框。以下是字段上的属性:

I am trying to have a default checked checkbox on a component dialog when editing. Here are the properties on the field:

jcr:primaryType: widget
checked: true (boolean) *Documentation says this determines default checked status
type: checkbox (string) *read this as a fix to making checkbox selections stick
xtype: selection (string)
name: ./foo (string)
fieldValue: true (string)


推荐答案

是的,它看起来文档有点古怪。我做了一些实验,这些属性组合对我有用:

Yes, it looks like the documentation is a little wonky. I did some experimenting, and this combination of properties works for me:

defaultValue (String) true
fieldLabel (String) Foo Mode
inputValue (String) false
jcr:primaryType (Name) cq:Widget
name (String) ./foomode
type (String) checkbox
xtype (String) selection

defaultValue属性似乎是键。

The defaultValue property appears to be the key.

您的主要类型确实有cq:Widget,不是小部件,不是吗?

You do have cq:Widget for your primary type, not widget, do you not?

这篇关于在CQ5中获取默认选中复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆