Getting Default Checked Checkbox in CQ5

前端 未结 3 1893
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 04:36

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: tr         


        
3条回答
  •  佛祖请我去吃肉
    2020-12-31 05:03

    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
    

    The defaultValue property appears to be the key.

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

提交回复
热议问题