Is there any radio sling:resourceType for the new Granite | Community
Skip to main content
Var
Level 4
Nov 29, 2018 6:37 PM UTC
Solved

Is there any radio sling:resourceType for the new Granite

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. ?

Legacy : RadioGroup — Granite UI 1.0 documentation

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>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Nov 29, 2018 8:16 PM UTC

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.

Arun Patidar

2 replies

smacdonald2008
Level 10
Nov 30, 2018 4:25 AM UTC

Arun is correct - see the reference docs here -- RadioGroup — Granite UI 1.0 documentation

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Nov 29, 2018 8:16 PM UTC

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.

Translate
Arun Patidar