aem

How to call Sling Model Method with input parameter AEM

六眼飞鱼酱① 提交于 2020-04-07 09:16:12
问题 I am having a scenario in which i want to call a sling model with input parameter. For this i have a code like this <div data-sly-use.model3="${'com.bhf.aem.sling.models.Test' @ colour='red'}"> </div> But I want to call a method in sling model twice with two different parameters .Is it possible with sling models? Any Help!!! 回答1: From AEM 6.3 there is a new HTL feature that allows to do this. In the data-sly-include and data-sly-resource you can now pass requestAttributes in order to use them

AEM Tools: Tag Picker using Coral

流过昼夜 提交于 2020-03-05 03:10:15
问题 I have gone through this: AEM Tag picker widget on a page But did not get any satisfactory answer. I have a tool made under apps/projectname/components/tools/toolname/content.jsp I understand that this needs to be made in coral UI. Anyway, I need a method by which I can implement an AEM Tag Picker (or a Tag Field) in this page which is written in JSP. 回答1: I had overlaid the cq/gui/components/common/tagspicker in the apps folder, and then edited the piece of code in the render.jsp to pick the

AEM Error with ExternalLoginModule

不想你离开。 提交于 2020-02-29 08:35:37
问题 I created author AEM6 on localhost:4504 . When I load any page on the server, I have a lot of the following errors: org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name cortexCSR. Will not be used for login. org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name cortex. Will not be used for login. org.apache.jackrabbit.oak.spi.security.authentication.external.impl

AEM Error with ExternalLoginModule

二次信任 提交于 2020-02-29 08:33:03
问题 I created author AEM6 on localhost:4504 . When I load any page on the server, I have a lot of the following errors: org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name cortexCSR. Will not be used for login. org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name cortex. Will not be used for login. org.apache.jackrabbit.oak.spi.security.authentication.external.impl

Failed to execute goal org.apache.felix:maven-scr-plugin:1.17.0:scr

只愿长相守 提交于 2020-02-06 08:11:29
问题 Started to work with AEM project. Now I am trying to launch project locally and got next error during building (stacktrace cut): [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.17.0:scr (generate-scr-scrdescriptor) on project canadian-tire-site-core: Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.17.0:scr failed: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class -> [Help 1] org.apache.maven.lifecycle

Failed to execute goal org.apache.felix:maven-scr-plugin:1.17.0:scr

﹥>﹥吖頭↗ 提交于 2020-02-06 08:10:05
问题 Started to work with AEM project. Now I am trying to launch project locally and got next error during building (stacktrace cut): [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.17.0:scr (generate-scr-scrdescriptor) on project canadian-tire-site-core: Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.17.0:scr failed: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class -> [Help 1] org.apache.maven.lifecycle

How to determine if a JCR property is multivalue?

限于喜欢 提交于 2020-02-04 03:33:26
问题 How do you determine if a JCR property is multivalve? I tried calling getType() on the property but that returns the same value if it's a String or String Array. Thanks! 回答1: Using the isMultiple() method of the Property class you can determine if the property is multi-valued or not. Property prop = node.getProperty("some-property"); if (prop.isMultiple()) { //do something } else { //do something else } 来源: https://stackoverflow.com/questions/42822066/how-to-determine-if-a-jcr-property-is

Authorisation issue while accessing a page from repository in CQ5.

廉价感情. 提交于 2020-01-25 20:57:17
问题 I'm trying to hit a page which contains a xml structure. for that i'm using this code @Reference private SlingRepository repository; adminSession = repository.loginAdministrative( repository.getDefaultWorkspace()); String pageUrl = "http://localhost:4504"+page+".abc.htm"; conn = (HttpURLConnection)new URL(pageUrl).openConnection(); conn.setRequestProperty("Accept-Charset", charset); conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko

AEM code and content migration from AEM 5.6.1 to AEM 6.1

╄→尐↘猪︶ㄣ 提交于 2020-01-25 06:20:28
问题 We have 3-4 application in AEM 5.6.1 and now we are migrating one of the applications to AEM 6.1. We will be creating packages of application from 5.6.1 and deploying them to new instance AEM 6.1. Is it all we need to do ? Or else we require any other steps or modifications also ? 回答1: Since AEM 6.1 removes support for CRX2, you must first migrate the repository to Apache Oak before upgrading if you are using an AEM 5.x or AEM 6.0 with a CRX2 backend installation. This doc helps. 回答2: Some

ResourceResolverFactory and SlingRepository null in Service class

泪湿孤枕 提交于 2020-01-25 01:54:08
问题 I have a Service class as below which I deployed using Maven and is Active on Sling Web Console. When I am accessing the method getSearchAssetNames() from this bundle it is getting called as per the AEM 6.0 logs on Authoring instance. But, implicit objects such as repository, resource resolver factory, query builder are all getting null pointer exceptions through how I have derived them using @Reference annotation. Here is the code for the class. I have tried removing activate, deactivate