具有两个单独的最后修改日期(jcr:lastModified和cq:lastModified)的意义是什么?是否存在其中一个日期被更新而第二个日期不被更新的情况。无法使用我们最后修改的版本之一(也许是jcr),并在各处使用它吗?
我的问题是,我们在应用程序中基于这两个日期定义的查询和条件很少,如果用法正确,则会感到困惑。
我的内容存储库在 2 年的时间里积累了许多过时的组件资源。组件节点缺少 sling:resourceType 属性。这些组件节点如下所示:
由于这种糟糕的资源,页面抛出以下异常:
14.09.2017 12:33:21.079 *ERROR* [172.21.142.98 [1505392399461] GET /content/xx/en_ca/home.html HTTP/1.1]
org.apache.sling.servlets.get.impl.DefaultGetServlet No renderer for extension html, cannot render resource Paragraph,
path=/content/xx/en_ca/home/jcr:content/par-sidebar/contentbox_c540/rightRailContentPar/contentbox_f1fd,
type=nt:unstructured, cssClass=default, column=0/0, diffInfo=[null],
resource=[JcrNodeResource, type=nt:unstructured, superType=null,
path=/content/xx/en_ca/home/jcr:content/par-sidebar/contentbox_c540/rightRailContentPar/contentbox_f1fd]
Run Code Online (Sandbox Code Playgroud)
进一步挖掘我发现有人写了一个工具来清理这些过时的资源。
虽然查询和清理这些无效节点很容易,但我的问题是这些资源是如何在存储库中结束的?我试图通过移动组件,从页面中删除组件来模拟但徒劳无功。没有删除 sling:resourceType 的自定义脚本。这个问题只有我一个人遇到吗?或者是否有任何产品问题/用例可以清除资源类型?
我正在运行 AEM 6.0 SP2。
网站标题的推荐方法是什么?页脚组件,其中ask是仅在主页上创建一次全局组件,并且站点下的所有页面将重用该内容.设计对话框将保存/ etc/designs下的创作内容,使用相同模板的页面只会选择它们.使用iparsys也可以实现类似的要求.推荐的方法是哪种?
在我的项目中,我在Sling模型类中看到,资源解析器以两种方式获取
@Inject private Resource resource;
ResourceResolver resolver = resource.getResourceResolver();
Run Code Online (Sandbox Code Playgroud)
VS
@Inject @Self private SlingHttpServletRequest request;
ResourceResolver resolver = request.getResourceResolver();
Run Code Online (Sandbox Code Playgroud)
虽然两者都是Sling实现,但是使用一个反对的其他是否有任何好处?或者这两个产生相同的旋转变压器没有性能差异?
HTL 中是否有数字格式化程序可以将数字格式化为 2 位数字。我想要
<h2>${ '#' @ format=3}</h2>
Run Code Online (Sandbox Code Playgroud)
渲染 03 而不是 3。
有没有一种 HTL 方法可以在不借助 Sling Model 的情况下做到这一点?
我们正在从AEM 6.0迁移到6.3,并且正在从Felix迁移到OSGI scr注释.我有这样的代码
@Component
@Service(AdapterFactory.class)
@Properties({
@Property(name = "CustomManagerAdapter", value = "adapter/factory"),
@Property(name = SlingConstants.PROPERTY_ADAPTABLE_CLASSES, value = {
"org.apache.sling.api.resource.ResourceResolver",
"org.apache.sling.api.SlingHttpServletRequest",
"org.apache.sling.api.resource.Resource"
}),
@Property(name = SlingConstants.PROPERTY_ADAPTER_CLASSES, value = "com.myapp.util.user.CustomUser")
})
public class CustomUserAdapter implements AdapterFactor
Run Code Online (Sandbox Code Playgroud)
如何将SlingConstants.PROPERTY_ADAPTABLE_CLASSES等多值属性转换为R6注释?
我尝试过:
@Component(service = AdapterFactory.class, property={
SlingConstants.PROPERTY_ADAPTER_CLASSES + "=com.myapp.util.user.CustomUser",
SlingConstants.PROPERTY_ADAPTABLE_CLASSES+"={\"org.apache.sling.api.resource.ResourceResolver\"}",
"CustomManagerAdapter=adapter/factory"
})
Run Code Online (Sandbox Code Playgroud)
这没用.请分享一个迁移多值属性的示例.
从JSR-283开始,CRX代表Content Repository Extreme。“ de”代表什么?(德语?)