Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Boolean property not exported

Avatar

Level 3

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!

1 Accepted Solution

Avatar

Correct answer by
Level 3

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.

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @prachiz,

 

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.

 

Avatar

Level 3
Thanks @Kiran_Vedantam! I'm not consuming the property in model, I am consuming it via graphQL

Avatar

Community Advisor

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)

Avatar

Correct answer by
Level 3

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.