Boolean property not exported | Community
Skip to main content
Level 3
July 16, 2021
Solved

Boolean property not exported

  • July 16, 2021
  • 4 replies
  • 2180 views

Hi,
I've added a new Checkbox in my existing dialogue and it's saved in crxde as Boolean, but when I try to get the value of the property using .model.json, I don't see the property exported. Other Boolean properties from same dialogue are exported.
I have tried publishing page and I don't see any errors in logs. I have also added a new instance of the component after updating it, but no luck.
I'm working on AEM 6.5.8
Any ideas? 

Thanks in advance!

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 aembee

I found the property exported in .model.json of specific component but it wasn't available in .model.json of the containing page, unless I set it from sling model.

4 replies

Kiran_Vedantam
Community Advisor
Community Advisor
July 16, 2021

Hi @aembee,

 

How are you consuming the property in the model? Can you try printing the value in HTL via model? The boolean values should be like below in the model and HTL:

 

@Inject @Optional
private Boolean sampleBoolean;

 

${javaClassObject.sampleBoolean}

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

 

aembeeAuthor
Level 3
July 16, 2021
Thanks @kiran_vedantam! I'm not consuming the property in model, I am consuming it via graphQL
Shubham_borole
Community Advisor
Community Advisor
July 18, 2021

Hi,

Curious to know what is the difference between the other boolean values that are exported fine, but just not the new check box added.

Suppose you have a boolean property prop1 working, can you assign a same(delete the old one)/similar name to the property name which is not working and see what is the response? Also check that the values for both working and non-working properties are same. Try both scenarios (true and false)

aembeeAuthorAccepted solution
Level 3
July 19, 2021

I found the property exported in .model.json of specific component but it wasn't available in .model.json of the containing page, unless I set it from sling model.