Home | Blog

Really? Preselected checkbox not working, common AEM?

Cover Image for Really? Preselected checkbox not working, common AEM?
Matija Kovacek
Matija Kovacek

Today I needed to add one, simple checkbox in page properties and it should be preselected by default. Sounds simple, 5 min task, yea sure...

Since I'm not doing this stuff so often I needed to check granite documentation to see how to achieve it. Looks simple, I found the properties that I need (value, uncheckedValue, checked).

<showSomething
	jcr:primaryType="nt:unstructured"
	sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
	cq:showOnCreate="{Boolean}true"
	text="Please be preselected by default"
	name="./showSomething"
	checked="{Boolean}true" // tried also with string "true"
	value="{Boolean}true" // "true"
	uncheckedValue="{Boolean}false" /> //"false"

And of course, it doesn't work in page properties just in the component dialog...

Since I'm tired of doing some hacks or writing Javascript to get this stuff working, I just switched dialog to hideSomething so that not preselected checkbox have sense.

I don't understand how that kind of simple thing doesn't work as expected OOTB.

Share your ridiculous cases which don't work? :D

Read more

Cover Image for Optimizing slow Unit Tests

Optimizing slow Unit Tests

Understanding the motivation behind optimizing slow unit tests is crucial. We'll explore the challenges faced by Client XYZ, why we wanted to fix them, and the good things that happened afterward. Expect insights into how faster tests can boost productivity and project success.

Matija Kovacek
Matija Kovacek
Cover Image for Importance of Code reviews

Importance of Code reviews

Inspired by some of the last few projects, I have noticed that still a lot of people don't consider Code Review seriously. So what is code review? A code review is a process where someone other than the author(s) of a piece of code examines that code. Code review should be used to maintain the quality of our code and products.

Matija Kovacek
Matija Kovacek
Cover Image for AEM API Integration with Feign HTTP client

AEM API Integration with Feign HTTP client

How to call RESTful Web Service in AEM? Luckily there is Feign HTTP client which simplifies REST API Integrations. Check out how to integrate it in AEM project.

Matija Kovacek
Matija Kovacek
Cover Image for Speed up the Maven Build Time

Speed up the Maven Build Time

How to speed up Maven build time? 2x time faster Maven build time with Maven Daemon.

Matija Kovacek
Matija Kovacek
Cover Image for Test behaviour, not implementation

Test behaviour, not implementation

Test behaviour, not implementation if you want to build right product. For your own good it will save you time and money.

Matija Kovacek
Matija Kovacek
Cover Image for Really? Preselected checkbox not working, common AEM?

Really? Preselected checkbox not working, common AEM?

Why one simple preselected checkbox doesn't work in page properties?

Matija Kovacek
Matija Kovacek
Cover Image for Updating AEM content with Sling Pipes

Updating AEM content with Sling Pipes

You are still updating content manually? Try out Sling pipes. Sling pipes is simple tool for executing CRUD operations over resources in AEM repository. But is it powerfull enough to replace your groovy scripts?

Matija Kovacek
Matija Kovacek