Is there any radio sling:resourceType for the new Granite

Var 29-11-2018

I see in the legacy there is a Radio component available, but where as its missing in the new version of Granite, have only Radiogroup. ?

1633443_pastedImage_1.png

Legacy : RadioGroup — Granite UI 1.0 documentation

1633444_pastedImage_3.png

New Granite : Granite UI Foundation Server-side — Granite UI 1.0 documentation

Can any one suggest where is the radio component properties will be belonging to when am upgrading the components dialog to AEM 6.4 .?

i.e

--> " granite/ui/components/foundation/form/radiogroup " to "granite/ui/components/coral/foundation/form/radiogroup" and

--> "granite/ui/components/foundation/form/radio" to "There is no component available"

Also what will happens to the properties like  below from old radiogroup will be belongs to when i upgrade.

  •           cq-msm-lockable="radiostype"
  •           renderReadOnly="{Boolean}true"
  •           checked = "{Boolean}true"

Old dialog

<myoldradiogroup

     jcr:primaryType="nt:unstructured"

     sling:resourceType="granite/ui/components/foundation/form/radiogroup"

     fieldLabel="Select myoldradiogroup Type"

     name="./myoldradiogroup"

     text="Select myoldradiogroup Type"

     value="manage-radios">

<items jcr:primaryType="nt:unstructured">                                     

     <option1

          jcr:primaryType="nt:unstructured"

          sling:resourceType="granite/ui/components/foundation/form/radio"

          cq-msm-lockable="radiostype"

          renderReadOnly="{Boolean}true"

          text="Manage radios"

          checked = "{Boolean}true"

          value="manage-radios"/>

     <option2

          jcr:primaryType="nt:unstructured"

          sling:resourceType="granite/ui/components/foundation/form/radio"

          cq-msm-lockable="radiostype"

          renderReadOnly="{Boolean}true"

          text="My Signup"

          value="my-signup"/>

     <option3

          jcr:primaryType="nt:unstructured"

          sling:resourceType="granite/ui/components/foundation/form/radio"

          cq-msm-lockable="radiostype"

          renderReadOnly="{Boolean}true"

          text="My Settings"

          value="my settings"/>                                  

  </items>

</myoldradiogroup>

New dialog

<mynewradiogroup

     jcr:primaryType="nt:unstructured"

     sling:resourceType="granite/ui/components/coral/foundation/form/radiogroup"

     fieldLabel="Select myoldradiogroup Type"

     name="./myoldradiogroup"

     text="Select myoldradiogroup Type"

     value="manage-radios">

<items jcr:primaryType="nt:unstructured">

     <option1

     />

     <option2

     />

     <option3

     />

    </items>

</mynewradiogroup>

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (2)

Answers (2)

Arun_Patidar
MVP
29-11-2018

Hi,

For Granite you don't need to specify resource type radio unlike Coral2. you can create options without using sling:resourceType but below properties are required.

RadioGroup — Granite UI 1.0 documentation

And to add cq-msm-lockable="radiostype"you need to add granite:data node as child node of option and need specify this property.

value string

The value of the field.

disabled boolean

Indicates if the field is in disabled state.

checked boolean

Indicates if the radio is checked when the form values don’t have a match by name property.

e.g. Given a radiogroup with name = name1

Form Values has named1?Its value match?checkedChecked?
truetruen/atrue
truefalsen/afalse
falsen/atruetrue
falsen/afalsefalse
text string
i18n

The text of the radio.