dantaframework / aem Goto Github PK
View Code? Open in Web Editor NEWThis package contained Danta Framwork's specific set of codes for AEM (Adobe Experience Manager).
License: GNU Affero General Public License v3.0
This package contained Danta Framwork's specific set of codes for AEM (Adobe Experience Manager).
License: GNU Affero General Public License v3.0
Consider to export the package aem.util it's mostly used for internal stuff, but contains util functions (e.g. PropertyUtils.propsToMap(componentNode)
)
The package danta.aem.util is not exported
There are util functions that should be exported
Exported the package inside the pom.xml in section <Export-Package></Export-Package>
(It is not a bug)
When I create a SlingModel Class and configure it to use AddSlingModelsPropertiesContextProcessor it complains that the SlingModel Class is not found because the AEM bundle is not importing the class in OSGi
It should add the SlingModel Data into the ContentModel
Add DynamicImport in the OSGi Manifest for AEM Bundle
Currently a null pointer exception is thrown when "AddDesignPropertiesContextProcessor" tries to access the designer style.
There should not be any null pointer exception when trying to read from Design context.
To add the null validation. This is the current validation (lines 80 to 84):
if (style.getPath() != null) {
Resource designResource = resourceResolver.getResource(style.getPath());
Map<String, Object> designMap = (designResource != null) ? PropertyUtils.propsToMap(designResource) : new HashMap<String, Object>();
contentModel.set(DESIGN_PROPERTIES_KEY, designMap);
}
This is how it could validate the null for "style":
if (style != null && style.getPath() != null) {
Resource designResource = resourceResolver.getResource(style.getPath());
Map<String, Object> designMap = (designResource != null) ? PropertyUtils.propsToMap(designResource) : new HashMap<String, Object>();
contentModel.set(DESIGN_PROPERTIES_KEY, designMap);
}
Trying to get the tags information by using page.[cq:tags] is not working. If you inspect the content of the Page Context you'll notice there is a "page.tags" property but it is empty even when the jcr:content node of the page actually has an array of strings in the "cq:tags" property.
page.tags should provide an array of strings in which each element should correspond to a tag.
The AddPagePropertiesContextProcessor is obtaining a map of page properties by calling a propsToMap() method which is internally filtering the reserved system name prefixes. This is making "cq:tags" property not being included because it starts with "cq:".
A possible solution could be reading tags either from the page object (Page page = pageManager.getContainingPage), the Resource object (page.getContentResource) or the Node object (Node pageContentNode = page.getContentResource().adaptTo) and then adding the tags array to the "tags" property in the "pageContent" map.
TemplateContentModelImpl has several issues which will make it difficult for external contributors to work with it. Examples:
synchronized
, but the class as a whole is not thread-safe. Do these methods need to be synchronized? Could a comment be added to provide some explanation?volatile
, but I don't think this provides the thread-safety that they were intended to. Reconsider these.newInstance()
. There is also commented out code. Remove these.response()
(is only used internally by wrappedResponse()
, and simply returns a field) and toJSONString()
(used only by toString()
). Likewise, there is a non-private inner class CharResponseWrapper
which is only used once, internally. That could be inlined as an anonymous inner class.wrappedResponse()
belongs in this class. The response wrapping should probably be moved to the calling class: IncludeResourceHelperFunction.This directive:
{% clientLibrary "mycompany" type="js" minify="false" %}
Is going to use the minified version of the client library regardless the value set to false.
I am not able to perform things such as:
{%content.jcr:title%}
Using ":" is a very typical practice in JCR based apps, such as AEM, as this is how you define namespaces for your properties. As a practical example, suppose that I need to have custom metadata properties for an AEM Asset and I want remove any possibility of a collision with metadata property names from others.
Also all of the AEM out of the box components that deal with titles for example, use jcr:title as the property name
This seems to work alright for properties with ":" that are part of a cq:Page's jcr:content node, but not for other resources
Please add support for this.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.