aem

cq5 accessing osgi servlet through Url

扶醉桌前 提交于 2019-12-08 05:11:14
问题 I am trying to access following sling servlet using http://localhost:4502/sling/test-services/planet.html But, it is giving 404 error, not sure what I am doing wrong here. @Component @Service(value=javax.servlet.Servlet.class) @Properties({ @Property(name="service.description", value="HTML renderer for Planet resources"), @Property(name="service.vendor", value="The Apache Software Foundation"), @Property(name="sling.servlet.resourceTypes", value="sling/test-services/planet"), @Property(name=

CQ5 sidekick elements disabled

为君一笑 提交于 2019-12-08 04:24:14
问题 I have an issue where at a specific path the sidekick items are disabled and I can't edit components on those pages. I'm logged in as admin and from the siteadmin I can't delete or move pages. If I go a node level lower or switch websites I have all of these permissions. All if the items in the sidekick are visible but are greyed out. I can't see page properties when I'm on the siteadmin page either. After reviewing the javascript console I see this happening: charset=utf-8&cq_ck

How to pass variable to javascript function through cq.ext.button handler?

不羁的心 提交于 2019-12-08 04:11:33
问题 I have the following code in my CQ dialog.xml <toolbar jcr:primaryType="cq:Widget" xtype="toolbar"> <items jcr:primaryType="cq:WidgetCollection"> <input jcr:primaryType="cq:Widget" xtype="textfield" name="./myInput"> </input> <button jcr:primaryType="cq:Widget" xtype="button" name="./myButton" text="Submit" handler ="function() {passMyInput()};"> </button> </items> I have implemented the function passMyInput() as follow: passMyInput(){ alert("test");} This works fine. My question is how to

How do we define global properties in CQ5

霸气de小男生 提交于 2019-12-08 03:39:57
问题 My Requirement is to have a global header and footer with author able properties. So if we update the properties on one page it should be reflected across all pages. What is the best approach to achieve this in CQ5. 回答1: If all of your pages site under a hierarchy, you could use an Inherited Paragraph System ( iparsys ). This is from an old version of the documentation, but is still a good intro: The inherited paragraph system is a paragraph system that also allows you to inherit the created

Setup AEM in Eclipse and create a project

混江龙づ霸主 提交于 2019-12-08 03:02:00
问题 I am very new to AEM and I am trying to create a AEM project in Eclipse based on certain tutorials from internet. After installing the AEM plugin by using this url, I tried to create the project. I tried different approaches - some of them failed. Approach - 1: Mars Eclipse, Java 1.8 and AEM 6.2 Select the Archetype-10, choose Setup new server , enter the server details and deploy it while creating the project, where I got an error " The server does not support version 2.4 of the J2EE Web

javax.jcr.nodetype.ConstraintViolationException: No matching property definition: PROPERTY

老子叫甜甜 提交于 2019-12-08 02:30:48
问题 When I am trying to set a property to my JCR node I am getting error javax.jcr.nodetype.ConstraintViolationException: No matching property definition: PROPERTY. I am a newbie to cq5. Please can someone help me to resolve this error? 回答1: In jcr every node has a node-type (value of "jcr:primaryType"). Most node-types define a schema of properties that are allowed on that node. You cannot just add whatever property you like. It has to be defined in the schema. If you try to add and persist

AEM/CQ5 Request Parameter not UTF-8

拈花ヽ惹草 提交于 2019-12-08 01:54:38
问题 Have a slight issue with AEM 6.0 SP1 and the search component. If searching for a french word like "Français" the "ç" gets messed up the query string is like ?q=Français on the JSP side, request.getCharacterEncoding() returns ISO-8859-1 instead of UTF-8 like we need. I know that when under tomcat you can change the URIEncoding at the connector level. But for an AEM/CQ instance running directly by itself, there is no such thing. Anyone figured this out? 回答1: For 5.6.1 : The default encoding

CQ5 - Hiding a tab within a component dialog depending on user group?

人走茶凉 提交于 2019-12-07 18:57:05
问题 Any ideas how I would hide or show a dialog tab panel depending on which user group the user belongs to? I tried to do this through the CRX content explorers (ACL's). But I'm not getting much luck with it. Cheers 回答1: As noted by anthonyh , the ACL approach is the way to go (if such a behavior is really necessary). For example, to hide the "image" tab of the base page component: edit acls for /libs/foundation/components/page/dialog/items/tabs/items/image add deny jcr:read for author login as

Having multiple cq:dropTargets in one component

会有一股神秘感。 提交于 2019-12-07 18:57:05
问题 I've managed to implement my single cq:dropTarget into my component with the following sightly code: <div data-sly-test="${wcmmode.edit}" class="cq-dd-videoplayer" data-sly-text="Drop video here"></div> And the cq:dropTargets is setup like so: <cq:dropTargets jcr:primaryType="nt:unstructured"> <videoplayer jcr:primaryType="cq:DropTargetConfig" accept="[video/.*]" groups="[media]" propertyName="./videoPath"/> </cq:dropTargets> This works perfectly... The issue I'm having is having multiple cq

CQ aka AEM | Blueprints vs. Live copies

混江龙づ霸主 提交于 2019-12-07 14:47:42
问题 In cq we can create live copies by either blueprints by opting "New Site..." or directly trough content nodes by opting for "New Live Copy..." . In both the cases inheritance is maintained and roll-out works too in same ways. So what is the advantage of using one over other. Any views? 回答1: Live Copies Live copies can be created for just a simple page or a tree of pages and might the page and it's subpages depending on the rollout configuration. A live copy can be linked to a rollout config