aem

CQ 5.6.1 getWorkflowSession cause Uncaught Throwable java.lang.NullPointerException

 ̄綄美尐妖づ 提交于 2019-12-19 05:00:43
问题 at com.cuso.Mao.doGet(Mao.java:97) at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268) at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344) at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375) at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:508) at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render

What is the use of Parbase component:

a 夏天 提交于 2019-12-19 02:06:41
问题 I couldn't understand the need for a parbase component in CQ5. From what I read in CQ5 documentation, parbase is a component that can extend from other components. But all the components can extend other components by specifying sling:resourceSuperType property. So what is the need for a parbase component? 回答1: As per the Day documentation, "The parbase allows components to inherit attributes from other components" If you check under "/libs/foundation/components", most of the authorable and

CQ5 Programmatically Run a Workflow

浪尽此生 提交于 2019-12-18 12:22:09
问题 I created a workflow, in CQ, that needed to be run programmatically via XHR. As many of you may know, CQ Documentation isn't the greatest (at least for this point). How can I run it programmatically ? 回答1: After poking around for a while I wrote a servlet that runs a Workflow Model. Here is the code with comments: @Component @Service @Properties({ @Property(name = "sling.servlet.paths", value = "/bin/runmodel"), @Property(name = "sling.servlet.methods", value = "GET") }) public class

How to get the CQ5 userInfo in java or jsp by using jackrabbit

你离开我真会死。 提交于 2019-12-18 08:31:13
问题 How to get the CQ5 userInfo by using org.apache.jackrabbit.api.security.user like name and group information in java or jsp .? 回答1: In JSP / Java you can adapt your resource to UserManager class and get the current user or list down all the users and groups as per your requirement. Session session = resourceResolver.adaptTo(Session.class); UserManager userManager = resourceResolver.adaptTo(UserManager.class); /* to get the current user */ Authorizable auth = userManager.getAuthorizable

Unable to deploy SlingServlet in CQ

蓝咒 提交于 2019-12-17 20:54:07
问题 I'm trying to create a servlet in CQ to access some back-end services. Then from my page will make an AJAX call to get the response from servlet. @Component(immediate = true, metatype = false, label = "feedServlet") @Service(Servlet.class) @Properties(value = { @org.apache.felix.scr.annotations.Property(name = "sling.servlet.methods", value = "POST"), @org.apache.felix.scr.annotations.Property(name = "sling.servlet.resourceTypes", value ="/bin/feedServlet/"), @org.apache.felix.scr.annotations

Restrict the components in AEM 5.6.1

你说的曾经没有我的故事 提交于 2019-12-17 16:22:52
问题 How can I restrict the components in AEM 5.6.1 that can be used in a particular parsys of a template with out selecting them in the design mode? 回答1: In CRXDE, under /etc/designs/[your design]/jcr:content , you can define nodes to represent each of your templates & their paragraphs & list the allowed components for each. The format is a node for each template that contains a node for each parsys (both [nt:unstructured] ). The parsys node then has a sling:resourceType defined of foundation

AEM CQ with JPA (Hibernate)

假如想象 提交于 2019-12-14 03:56:53
问题 I'm working with Adobe Experience Manager (AEM) 6.4 with Service Pack 1, and the Forms Package. I have a lot of extended Properties/attributes, so I made a Database diagram. I don't want to save all the additional stuff in crx I want to save it in an Oracle database. The Database diagram is complex, so I want to USE JPA (Hibernate), at minimum. If Spring would help to make it easier to use, than that would be fine for me. I read a lot that the OSGI is working with blueprint instead of Spring,

AEM 6.3 - Maven build is successful but still doesn't install all the content

笑着哭i 提交于 2019-12-14 03:30:46
问题 I am having this weird issue where I have created a fresh new AEM project using lazybones and then when I ran the maven build for the first time the project structure got created in the CRXde. Then I created a component in the CRXde and exported it using vlt too. Made some changes to the component HTL file and ran the maven build. *EDIT The changes are reflected in the component script but if I delete the component from the CRXde and run the build again, the component isn't installed even

Delete Multiple Users by there login ID in AEM using CURL

淺唱寂寞╮ 提交于 2019-12-14 03:08:45
问题 I have the login id's of all the 500 users which need to be deleted from AEM 6.3 . How can i do it by using curl command . 回答1: Use applyTo request parameter to remove multiple items through a single request. To delete multiple users - curl -u admin:admin -F":operation=delete" -F":applyTo=/home/users/geometrixx/charles.s.johnson@trashymail.com" \ -F":applyTo=/home/users/geometrixx/carlene.j.avery@mailinator.com" http://localhost:4502/home/users Try this on your local instance first, you might

Sightly jstl c:set analog

夙愿已清 提交于 2019-12-14 02:44:58
问题 On jsp I can write following code: <c:set var="salary" value="${object.salary}"/> and then in code I can use ${salary} variable Can you help to rewrite it using sightly? P.S. I tried this: <div data-sly-use.salary="MySalary"> <div data-sly-use.product="MyBean" data-sly-unwrap> { <ul data-sly-list="${product.specifications}" data-sly-unwrap> "${item.sku ? item.sku : 'product'}" : "${item.label} ${item.value}"<div data-sly-test="${!itemList.last}" data-sly-unwrap>,</div> </ul> } </div> </div>