aem

AEM 6.1 Sightly basic form submit and redirect to same page

喜欢而已 提交于 2019-12-06 02:30:13
问题 I am trying to do the following on AEM 6.1: Develop a simple form (3 input fields) Process the submitted values, And redirect to the same page with processed values/result I am able to submit the values to a servlet, and process them (business logic), and the result to a requestparamter so i can retrieve them on the UI. But i am stuck at these: Redirecting to the same page And retrieving the request parameters and display them using Sightly. Code Snippets: Servlet @SlingServlet( methods = {

Multifield component issue

為{幸葍}努か 提交于 2019-12-06 02:12:16
问题 I am creating a multifield component having 2 textfields. Following is my dialog xml. <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Dialog" title="dialog" xtype="dialog"> <items jcr:primaryType="cq:WidgetCollection"> <links jcr:primaryType="cq:Widget" fieldLabel="QuickLinks" name="./links" xtype="multifield"> <fieldConfig jcr:primaryType="cq:Widget" xtype="multifield"> <items jcr:primaryType

How does AEM resolve the JSON extension?

谁说胖子不能爱 提交于 2019-12-06 00:12:48
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 this information to write logic for returning the node information in JSON. I'm trying to learn about

how sling rewriter works clarification

北城余情 提交于 2019-12-05 19:46:05
I am trying to understand how sling url rewrite works. I'm following this url - http://www.cognifide.com/blogs/cq/multidomain-cq-mappings-and-apache-configuration/ Steps I've done in publish environment - /etc/map.publish/http: jcr: primaryType: "sling:OrderedFolder", home: { sling:internalRedirect: ["/content/geometrixx/en.html"], jcr:primaryType: "sling:Mapping", sling:match: "localhost:4503/$" }, localhost.4503: { sling:internalRedirect: ["/content/geometrixx/en"], jcr:primaryType: "sling:Mapping", redirect: { sling:internalRedirect: ["/content/geometrixx/en/$1","/$1"], jcr:primaryType:

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

谁说我不能喝 提交于 2019-12-05 19:06:09
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 of a richtext Or try not to use a richtext in a multifield . If richtext in a multifield is required

CQ5 Remove Render-Blocking JavaScript

倾然丶 夕夏残阳落幕 提交于 2019-12-05 18:44:33
I'm working on this document to remove blocking js: Remove Blocking JS However with CQ5 we include js via: <cq:includeClientLib js="headlibs"/> How can I modify script tag like: <script async src="my.js"> So I can remove blocking JS. The cq:includeClientLib does not have any options to do this. You can try using the com.day.cq.widget.HtmlLibraryManager interface to get the path of JS file, the tag is a is a convenience wrapper of this interface. com.day.cq.widget.HtmlLibraryManager clientlibmanager = sling.getService(com.day.cq.widget.HtmlLibraryManager.class); if(clientlibmanager != null) {

CQ aka AEM | Blueprints vs. Live copies

做~自己de王妃 提交于 2019-12-05 18:37:52
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? 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 or will use the system's default one. There is no formal requirement on the source page's structure. A live

How to enable WebDAV in Adobe AEM?

人盡茶涼 提交于 2019-12-05 13:55:30
I am trying to access Adobe AEM via WebDAV, however, I cannot get it to work. I am running the out-of-the-box crx-quickstart, so I am using port 4502 and the default workspace. I am using Windows Explorer as the WebDAV client, which I use to connect to Sharepoint without difficulty. These seem to be the only instructions for connecting to AEM via WebDAV. http://dev.day.com/docs/en/crx/current/how_to/webdav_access.html The instructions imply that you just point your WebDAV client at the following URL and you are golden. However, I cannot seem to get it to work. http://localhost:4502/crx

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

拈花ヽ惹草 提交于 2019-12-05 12:30:37
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 You probably didn't place your class inside a package. Add package your_package_name; at the top of your .java file and you should

creating custom MIME type in cq5/AEM

随声附和 提交于 2019-12-05 11:04:34
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 cq5 associate MIME types to an asset, or I is there another way to circumvent the problem? Ok, I found