如何在AEM 6触摸对话框中创建单选按钮 [英] How to create a radio button in aem 6 touch dialog

查看:105
本文介绍了如何在AEM 6触摸对话框中创建单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个触摸UI组件,正在AEM 6中为其创建对话框。我需要在触摸对话框中创建2个单选按钮,如果选择了其中一个,则所选单选的相应值按钮应显示。但是,我不了解如何创建单选按钮选项。我已经在使用xtype = selection和type = radiogroup的经典对话框中实现了相同的功能,但是我不明白如何在触摸对话框中创建它。

I am having a touch UI component for which I am creating a dialog in AEM 6. I have a requirement to create 2 radio buttons in the touch dialog and if either one of them are selected, the corresponding value of the selected radio button should be displayed. however, I am not understanding how to create the radio button options. I have implemented the same in classic dialog where the xtype=selection and type=radiogroup is used, but I do not understand how to create it in touch dialog

推荐答案

您可以使用表单输入-广播。要创建单选按钮组,请为所有单选按钮提供相同的名称。无线电输入的resourceType为 / libs / granite / ui / components / foundation / form / radio

You can use Form Input - Radio . To create a radio button group give all radio buttons the same name. The resourceType of Radio input is /libs/granite/ui/components/foundation/form/radio.

样本节点的Json:

"hideinnav": {
"jcr:primaryType": "nt:unstructured",
"name": "./hideInNav",
"text": "Hide in Navigation",
"value": "true",
"cq-msm-lockable": "hideInNav",
"sling:resourceType": "/libs/granite/ui/components/foundation/form/radio",
"renderReadOnly": true
},
"showinNav": {
"jcr:primaryType": "nt:unstructured",
"name": "./hideInNav",
"text": "Show in Navigation",
"value": "false",
"cq-msm-lockable": "hideInNav",
"sling:resourceType": "/libs/granite/ui/components/foundation/form/radio",
"renderReadOnly": true
}

按钮设置在选项节点下的经典UI选择小部件,单选按钮是独立的,可以直接在容器中使用。

Unlike the Classic UI Selection widget where the buttons are set under options node , radio buttons are independent and can be directly used in containers.

这篇关于如何在AEM 6触摸对话框中创建单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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