Could not find artifact com.adobe.aem:uber-jar Error
AEM Blog
by Heena
6d ago
Have you been trying to get the first build running for your project but the build is throwing following error? Follow along for the resolution. Cause: The error occurs because the version of Uber JAR that it is searching for is not present. This is because for this Adobe Experience Manager version, no updates were made to the UberJar. Resolution: To resolve this issue, simply update the Uber JAR version to nearest lower version which in this example would be 6.5.15 ..read more
Visit website
Adaptables parameter in Sling Model | AEM
AEM Blog
by Heena
4M ago
Confused about when to pass what class in adaptables parameter to the @Model annotation in an AEM Sling Model? When defining a Sling Model class, the adaptables parameter to the @Model annotation is mostly determined by the injectors being used in it. What class you passed totally depends on what you want out of the model. If you want to fetch values from for example the authored values, which is in turn a resource, you will pass Resource.class. Whereas, if you want to fetch request based values, you will pass SlingHttpServletRequest.class to adaptables. For example, if the Sling Mo ..read more
Visit website
Sling Model Exporters in AEM: An Overview
AEM Blog
by Heena Shirke
4M ago
Sling model exporter in AEM enables you to export resource in JSON format. It is implemented by adding @Exporter annotation to the Sling Model. Without Custom Sling Exporter class, It will return all the node properties using OOTB Sling Model Exporter while Custom Sling Exporter exports properties defined in Sling Model. Exporters implementations may also support annotations that can be applied inline on the Sling Model, that can provide a finer level of control how the data is exported. When to use Sling Exporter? Sling Model Exporter is perfect for leveraging Sling Models that already ..read more
Visit website
What are Event Handlers in AEM?
AEM Blog
by Heena Shirke
4M ago
Let's Dive into Event Handlers today! Event Handler is responsible for Sling Level Events. It uses the OSGi Event Admin service to receive events. You can use it to capture custom events or events from other parts of the system. Event Handlers have a default 5 sec Timeout(Set in Apache Felix Event Admin Implementation). If the execution time goes beyond Timeout value, then the handler would be blacklisted and would never execute. How to listen to an Sling Level event? An event is listened by implementing EventHandler interface which belongs to org.osgi.service.event&n ..read more
Visit website
What are Event Listeners in AEM?
AEM Blog
by Heena Shirke
5M ago
Event listener is responsible for JCR level events which means it can capture events related to changes in the content repository. Following are the events to which an event listener listens: Event.NODE_ADDED Event.NODE_MOVED Event.NODE_REMOVED Event.PERSIST Event.PROPERTY_ADDED Event.PROPERTY_CHANGED Event.PROPERTY_REMOVED How to listen to an JCR event? An event is listened by implementing EventListener interface which belongs to javax.jcr.observation package. Listener Implementation will consist of following three methods: activate(): This method helps registering the ..read more
Visit website
What is Anonymous User in AEM?
AEM Blog
by Heena Shirke
7M ago
Ever wondered how the permissions are assigned to the visitor of a site in case if it doesn't have a login system? This is done by providing access to the user named anonymous. It holds the permission for unauthenticated access to an AEM instance. If you accidentally delete this account, it is re-created on startup. It cannot be permanently deleted, but it can be disabled ..read more
Visit website
How to create a sling servlet with dynamic path
AEM Blog
by Heena Shirke
9M ago
I recently worked upon a use-case where I had to register a sling servlet with dynamic paths, and following is how I implemented it: To designate an ObjectClassDefinition to the Servlet which on save of the configuration, sets the servlet.servlets.paths property of the servlet. @Component(service = Servlet.class) @Designate(ocd = DynamicallyRegisteredServlet.Config.class) public class DynamicallyRegisteredServlet extends SlingSafeMethodsServlet { private static final long serialVersionUID = 1L; @ObjectClassDefinition(name = "DynamicallyRegisteredServlet ..read more
Visit website
Sling Job and JobConsumer
AEM Blog
by Heena Shirke
10M ago
A JOB is an action which is guaranteed to be performed at least once and its state is persisted under node /var/eventing/jobs. A Job's at least once execution can't be guaranteed if the AEM instance that is processing the job itself crashes after processing the job but before persisting its state. That's quite rare. When would you use job to perform a task? Following are few use cases where Job can be used: Store Reports Workflow Automation Email Notification How do we trigger a job? A Job is triggered using a JobConsumer OSGI Service which is registered to one or more topics. Every Job has ..read more
Visit website
Is @ValueMapValue and @Inject same?
AEM Blog
by Heena Shirke
10M ago
Nope, it is not! Following are the Injectors Available: Scripting Bindings ValueMap (We will specifically talk about this annotation on this post) Child Resource Request Attribute Resource path OSGi service Context-Aware Configuration Self Sling Object @Inject iterates through all available injectors and injects the first non-null value provided by an injector. This lead to unpredictable behavior, although the order is well-defined. Also, this turned out to be a performance bottleneck, especially if (optional) injections were not successful, and then all other injectors have to be tried. Whe ..read more
Visit website
How to iterate Multifield simply using HTL
AEM Blog
by Heena Shirke
1y ago
Let's refer Multifield we created here, which has following fields: Following HTML uses Sling Model to access multifield values: Title: ${multifielditem.name} URL: ${multifielditem.url} Following HTML uses Global Object resource to access multifield values: Title: ${multifielditem.name} URL: ${multifielditem.url} Using HTL for accessing Multifield values comes handy when no custom processing is required on dialog values ..read more
Visit website

Follow AEM Blog on FeedSpot

Continue with Google
Continue with Apple
OR