few values in cq:dialog not working | Community
Skip to main content
ashwinka
Level 2
October 29, 2024
Solved

few values in cq:dialog not working

  • October 29, 2024
  • 3 replies
  • 505 views

few properties like checked(checkbox, radiogroup) , margin (container) , defaultValue (Numberfield) are not working 
below is my cq:dialog

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

jcr:primaryType="nt:unstructured"

jcr:title="Employee Details"

sling:resourceType="cq/gui/components/authoring/dialog">

<content

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/coral/foundation/container">

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

<tabs

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/coral/foundation/tabs">

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

<tab1

jcr:primaryType="nt:unstructured"

jcr:title="tab1"

sling:resourceType="granite/ui/components/coral/foundation/container">

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

<columns

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">

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

<column

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/coral/foundation/container">

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

<name

jcr:primaryType="nt:unstructured"

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

fieldLabel="Enter employee name"

name="./name"/>

<gender

jcr:primaryType="nt:unstructured"

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

fieldLabel="Gender"

name="./gender"

vertical="{Boolean}false">

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

<notmention

jcr:primaryType="nt:unstructured"

checked="{Boolean}true"

text="Not Mention"

value="notmention"/>

<male

jcr:primaryType="nt:unstructured"

text="Male"

value="male"/>

<female

jcr:primaryType="nt:unstructured"

text="Female"

value="female"/>

</items>

</gender>

</items>

</column>

</items>

</columns>

</items>

</tab1>

<tab2

jcr:primaryType="nt:unstructured"

jcr:title="other info"

sling:resourceType="granite/ui/components/coral/foundation/container">

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

<columns

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">

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

<column

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/coral/foundation/container">

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

<probationperiod

jcr:primaryType="nt:unstructured"

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

name="./isProbation"

text="Is probation completed"/>

<yearsofexp

jcr:primaryType="nt:unstructured"

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

defaultValue="2"

fieldLabel="No of years of experience"

name="yearsofexp"/>

</items>

</column>

</items>

</columns>

</items>

</tab2>

</items>

</tabs>

</items>

</content>

</jcr:root>

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by EstebanBustamante

Hi,

I am not sure exactly what you are trying to accomplish, but you could explore the use of cq:template, which will give you an initial value. http://www.sgaemsolutions.com/2018/02/cqtemplate-and-cqtemplatepath.html 

 

Hope this helps!

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
October 29, 2024

Hi,

I am not sure exactly what you are trying to accomplish, but you could explore the use of cq:template, which will give you an initial value. http://www.sgaemsolutions.com/2018/02/cqtemplate-and-cqtemplatepath.html 

 

Hope this helps!

Esteban Bustamante
PRATHYUSHA_VP
Community Advisor
Community Advisor
October 30, 2024

Hi @ashwinka 

 

Can you please elaborate what exactly is not working ?

 

Thanks

kautuk_sahni
Community Manager
Community Manager
November 5, 2024

@ashwinka Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni