aem

How to use richtext in multifield (in CQ5 dialog)? (prevent “this.el.dom is undefined” error)

╄→尐↘猪︶ㄣ 提交于 2019-12-07 14:32:29
问题 I have created a custom component, and try to use RTE ( xtype="richtext" ) inside the multifiled in my dialog. Now, when I try to delete item, or after dialog was closed & reopened add another one the dialog will neither close, nor save the data with OK button. dialog.xml: <myField jcr:primaryType="cq:Widget" name="./myField" xtype="multifield"> <fieldConfig jcr:primaryType="cq:Widget" xtype="richtext"> </fieldConfig> </myField> Sham HC posted 2 solutions at AEM FAQ's: Use textfield instead

How can list elements be looped under <script> in sightly?

二次信任 提交于 2019-12-07 13:15:36
问题 In my html page I would like to loop through the properties returned by my Java class but do it under <script> tag. Currently my html page has this: <div id="map_wrapper"> <div data-sly-use.ev="Foo" class="mapping" id="${ev.googleClass || ''" > </div> </div> <script> .... var markers = [ ['Bondi Beach', -33.890542, 151.274856], ['Coogee Beach', -33.923036, 151.259052], ['Cronulla Beach', -34.028249, 151.157507], ['Manly Beach', -33.80010128657071, 151.28747820854187], ['Maroubra Beach', -33

How does AEM resolve the JSON extension?

こ雲淡風輕ζ 提交于 2019-12-07 12:25:29
问题 In CQ, if I request a resource such as localhost:4502/content/geometrixx/en.json , I would get the node information in JSON format. The same applies for the XML extension as well. My question is, where is it implemented that the node information is rendered in JSON format if the URL extension is json ? Basically, the extension is just simply text and another part of the URL structure. Simply appending json won't magically fetch the information in JSON format. Obviously, one would have to use

AEM6 Sightly: How to pass a parameter from HTML to a method from Java-model class?

喜欢而已 提交于 2019-12-07 12:10:40
问题 I wanted to pass a parameter from html to WCMUse class. Java: public class ComponentHelper extends WCMUse { public void activate() throws Exception {} ... public String methodA(String parameter1) { ... } public String getParam() { String param = ""; ... return param; } } HTML: <componentHelper data-sly-use.componentHelper="ComponentHelper" data-sly-unwrap /> ... <div> ${componentHelper.methodA @ parameter1=componentHelper.param} <!--/* Also tried: ${componentHelper.methodA @ componentHelper

cq5 - livecopy - how to tell when a page is a live copy and finding the children of its parents

自闭症网瘾萝莉.ら 提交于 2019-12-07 06:43:08
问题 Our setup has various websites and some of which are livecopies from the main site. We are trying to determine if the page we are on is a livecopy. If so try and get its parent and the children of the parents. This allows us to determine each pages siblings to then use how we want. Is this easily achievable using cq? 回答1: Checking if the page is a live copy You can use LiveRelationshipManager, adaptable from resource resolver: resourceResolver.adaptTo(LiveRelationshipManager.class) It has

creating custom MIME type in cq5/AEM

China☆狼群 提交于 2019-12-07 06:01:12
问题 I need to add support for a proprietary 3D format in cq5/AEM. Despite having absolutely no experience with this, I managed to generate a few working components to visualize the assets. But now, I need to create custom media handler to generate renditions and thumbnails from the model. The problem is, media handlers can only work on assets of specific MIME types, and cq5 do not associate a type to my assets. Thus, I can not have a media handler called on them. Is there any way to customize how

The default package '.' is not permitted by the Import-Package syntax

被刻印的时光 ゝ 提交于 2019-12-07 05:30:07
问题 Trying to run @org.junit.Test with Intellij IDEA. It's an OSGi bundle, when hit Run 'testMyTest' Getting following exception: Error:osgi: [b2b-bundle] The default package '.' is not permitted by the Import-Package syntax. This can be caused by compile errors in Eclipse because Eclipse creates valid class files regardless of compile errors. The following package(s) import from the default package null Could someone kindly share light on this exception? Thanks, Peter 回答1: You probably didn't

How to give user permissions programmatically?

拈花ヽ惹草 提交于 2019-12-07 04:51:27
问题 I know I can give permissions in ${host}:4502/useradmin when I double click user login and go to Permissions tab I want to give permissions when I deploy content package. Is it possible? 回答1: When you give permission for a user for a particular node/path , it basically stores the permission on the node level below the rep:policy node (allow/deny). I want to give permissions when I deploy content package. You can deploy an AEM package containing only rep:policies which will serve the same

What exactly does currentDesign.writeCssincludes include?

流过昼夜 提交于 2019-12-07 02:01:04
问题 I'm trying to figure out exactly what css is included by the standard call to currentDesign.writeCssIncludes(pagecontext); found in headlibs.jsp. The documentation states simply that it is Convenience method that writes the CSS include strings to the response. Looking at what it seems to do, it will include /etc/designs/currentdesign.css which is built off the design components css, and /etc/designs/currentdesign/static.css , which is just a static file. But is this all that is will include?

How to Enable CORS in CRXDE Lite/AEM

假如想象 提交于 2019-12-07 00:25:29
We use CRX DE lite/Adobe EM as our backend for our Angularjs SPA UI/frontend. How can we set CORS for this backend technology? We have access to the tool http://localhost:4502/crx/de/index.jsp to change settings. But we are not sure how to set CORS enabled. Please advice. As of AEM 6.3 There is an OOTB service called Adobe Granite Cross-Origin Resource Sharing Policy . It was as easy as creating an OSGi configuration with the alloworigin=[http://localhost:8000] property. In my case, my Angular application was running on port 8000 trying to access the publisher on 4503. Prior AEM 6.3 What I