aem

How to work with a bundle in eclipse when it was downloaded from AEM

隐身守侯 提交于 2019-12-01 05:23:49
问题 I downloaded a zip from a running instance of AEM from package manager - http://localhost:4502/crx/packmgr/index.jsp . The zip file, when extracted contains, jcr_root and META-INF . I would like to build some functionality on top of this zip file. So I'm wondering if there is a way to work with this file in eclipse? However, there are no pom.xml files in this zip folder. So I can't just import it in Eclipse. I have AEM developer tools downloaded for Eclipse. Is there a guide available that

Rendering telephone links in HTL based on input from a Rich Text widget

旧巷老猫 提交于 2019-12-01 03:07:26
问题 I have a component using the Rich Text Edit widget ( xtype="richtext" ) in my project that's used across the entire site as the default text component. The users would like to be able to insert phone links using the tel URI scheme into the text entered using this component. The dialog allows them to do so but when the contents of the Rich Text Edit are rendered in Sightly/HTL later on, the html context is used: {$text @ context='html'} Once this is done, the value of my attribute is ignored.

CQ 5.6.1 getWorkflowSession cause Uncaught Throwable java.lang.NullPointerException

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 02:01:53
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(SlingComponentFilterChain.java:45) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter

Which config is applied when number of matched run modes is the same

别等时光非礼了梦想. 提交于 2019-12-01 01:59:11
问题 I am using OSGI config files to define configuration for different environments, as specified in OSGI Configuration. I have configurations for multiple run modes saved in the same repository. The documentation states "If multiple configurations for the same PID are applicable, the configuration with the highest number of matching run modes is applied." What is the mechanism if multiple configurations for the same PID are applicable and two or more configurations are tied for the highest

AEM6 component allowedChildren not working

别等时光非礼了梦想. 提交于 2019-11-30 20:36:57
Using AEM6 i want to restrict the type of components in a parsys. I have a parsys in a page. i drag a custom component from the sidebar to the parsys page. The custom component also has a parsys. I can drag sidebar components into my component parsys. In the custom component parsys all the operations work as expected, drag, drop, reorder, delete. Using allowedChildren and / or allowedParents in the custom component and child parsys (.content.xml) has no effect, i can not restrict the type of components in component parsys. In AEM6 how can i restrict the type of components in a parsys? Not sure

What is the use of Parbase component:

无人久伴 提交于 2019-11-30 20:21:42
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? Riju Mahna 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 draggable components have 'parbase' set as their 'sling:resourceSuperType' so that they can

Pass data from one component to another in adobe CQ

孤者浪人 提交于 2019-11-30 18:35:19
问题 I'm using Adobe CQ5. I have made two components that are independent of each other. However, I want to use data from one component in the other one. How do I achieve this? How can I make two components interact with each other? Thanks in advance. 回答1: You can use javax.jcr.Node and javax.jcr.Property interface to get properties of another component. For example, you have added component1 and component2 to page1. In the repository you should have structure similar to this: /content /project

Set a CQ5 component to editable or not editable

跟風遠走 提交于 2019-11-30 18:24:40
问题 Is it posible if i want to set a cq5 component editable in page A, but not editable in page B. For example: at page A, i have C component we allow authors to open dialog and edit the component. But we do not allow authors to open dialog to edit component C on Page B. I try to research cq:EditConfig link, but It's not enough documentation to resolve my issue. 回答1: You can set ComponentContext.BYPASS_COMPONENT_HANDLING_ON_INCLUDE_ATTRIBUTE before the include, and remove it after the include.

How to set a resource property

霸气de小男生 提交于 2019-11-30 17:49:50
I have a Sling Resource object. What is the best way to set or update its property? Tomek Rękawek It depends on the Sling version: Sling >= 2.3.0 (since CQ 5.6) Adapt your resource to ModifiableValueMap , use its put method and commit the resource resolver: ModifiableValueMap map = resource.adaptTo(ModifiableValueMap.class); map.put("property", "value"); resource.getResourceResolver().commit(); Sling < 2.3.0 (CQ 5.5 and earlier) Adapt your resource to PersistableValueMap , use its put and save methods: PersistableValueMap map = resource.adaptTo(PersistableValueMap.class); map.put("property",

How to configure antisamy in cq 5.5?

空扰寡人 提交于 2019-11-30 16:07:03
问题 I have cq 5.5 project. I want to Prevent XSS attacks. According this link cq provides integration with AntiSamy project. Please provide concrete steps for integration with AntiSamy because I really cannot find it. update Should I write code like this somewhere? import org.owasp.validator.html.*; Policy policy = Policy.getInstance(POLICY_FILE_LOCATION); AntiSamy as = new AntiSamy(); CleanResults cr = as.scan(dirtyInput, policy); MyUserDAO.storeUserProfile(cr.getCleanHTML()); // some custom