How to provide custom value on checkbox in cq5 dialog?

后端 未结 1 1337
无人及你
无人及你 2021-01-28 20:57

I just created a widget inside my dialog in whose xtype=selection i.e checkbox. Is there any way through which i can get my custom value instead of true and false while select a

相关标签:
1条回答
  • 2021-01-28 21:39

    You can give this a try

    {
      xtype: "selection",
      fieldLabel: "Yes/No",
      name: "./yesNo",
      hideLabel: false,
      type: "checkbox",
      allowBlank: true,
      jcr:primaryType: "cq:Widget",
      fieldDescription: "Check for Yes",
      options: {
          jcr:primaryType: "cq:WidgetCollection",
          option0: {
                    value: "Yes",
                    jcr:primaryType: "nt:unstructured",
                    text: ""
                   }
             }
    }
    

    And when reading it properties.get("yesNo","No")

    0 讨论(0)
提交回复
热议问题