Hi Team,
I'm trying to get used of Sling model exporter capability where http://localhost:4502/content/<prject>/en/page/jcr:content/parsys/component.model.json
But I 'm getting an error saying Invalid recursion selector value 'model'.
How I can get sorted this ?
Note - Is this we can use only for content fragment with a content fragment proxy component ?
Thanks!
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
Hi @arunpatidar
Can't we get specific component data inside page in json format rather whole page data ?
Hi @JakeCham,
You need to make sure your component has Sling Model implementation; otherwise you'll encounter Invalid recursion selector value 'model' error.
@Model(
adaptables = { SlingHttpServletRequest.class },
adapters = { Article.class },
resourceType = { Article.RESOURCE_TYPE },
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
@Exporter(
name = ExporterConstants.SLING_MODEL_EXPORTER_NAME,
extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class Article {
protected static final String RESOURCE_TYPE = "aem-demo/components/article";
// Implementation
}
http://localhost:4502/content/aem-demo/us/en/jcr:content/root/container/container/artice.model.json
You can get any Sling Model exported, you just need to prepare the model for it, see the documentation here: https://experienceleague.adobe.com/docs/experience-manager-65/content/implementing/developing/compon...