aem - 支持用于创建体验片段模板的 xfPage 组件的 OOTB sign 模型是什么?
问题描述
我想创建一个吊索模型来扩展 OOTB xfPage 组件 /libs/cq/experience-fragments/components/xfpage
我在 apps/myProjecy/cpomponent/xfPage --> 使用 sling:resourceSupertType = /libs/cq/experience-fragments/components/xfpage 创建了一个代理 xfPage 组件
我在 content/experience-fragments/myContentFolder/exp-fragment-master/variant 下有一个体验片段,它是使用 xfPage 模板创建的。
我可以在下面的模型中使用 xfPage 的实例吗?
@Model(
adaptables = {SlingHttpServletRequest.class},
adapters = { ComponentExporter.class,
ContainerExporter.class,
Page.class},
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL,
resourceType = "myProjecy/cpomponent/xfPage"
)
@Exporter(name = "jackson", extensions = "json")
@JsonSerialize(as = xfPageModel.class)
public class xfPageModel {
@Self
@Via(type = ResourceSuperType.class)
private xfPage xfPage ;
}
解决方案
推荐阅读
- visual-studio - Visual Studio 中的 docker run 命令在哪里
- python - 使用迭代器对数组进行切片
- joomla - Joomla - 如何将所有异常/错误重定向到 404 页面或返回主页
- json - 单个实体的 Swift 可编码动态键
- python - NameError:未定义名称“read_image”
- python-3.x - 如何在 gensim 中加载 Bio2Vec?
- scala - 如何在将 csv 文件加载到配置单元表时跳过页脚/拖车记录
- javascript - 如何在没有数据丢失的情况下将数据存储在 database.db 中?
- wordpress - 尝试建立基于用户评论的网站
- prolog - Prolog - 操作员优先级问题