활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
cq:dilog code
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Properties"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<accordion
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldLabel="News">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./multifield">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<description
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Description"
name="./title"/>
</items>
</column>
</items>
</field>
</accordion>
</items>
</column>
</items>
</content>
</jcr:root>
htl code
<pre data-sly-use.hello="com.aem.HDFC_GIGA.core.models.ArticalCardValueModel">
<sly data-sly-list="${hello.articles.listChildren}">
HelloWorldModel says: ${item.title}
</sly>
</pre>
조회 수
답글
좋아요 수
i want value to be stored as individual node
but it get stored inside parent node
package com.aem.HDFC_GIGA.core.models;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Default;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.Optional;
import org.apache.sling.settings.SlingSettingsService;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
@Model(adaptables=Resource.class)
public class ArticalCardValueModel {
@Inject
@Optional
private Resource multifield;
@PostConstruct
protected void init() {
}
}
Sorry, i make mistake in understanding yours Question i have only use that resource type to create multifield
I feel author's entries like title are getting stored as a multi value property (String[]) and because of it you are facing the issue. Please correct me.
I have tested with your .content.xml associated with cq:dialog and author's entries are getting stored as individual nodes as shown below -
composite="{Boolean}true" supports this node structure. Could you please test the component on different page and share your observation with error details.
as of no new error but node like structure is not created
@Inject
@Optional
private Resource multifield;
now i change "private to public" and now i am able to fetch ad display the value on page
but still not getting the node structure
조회 수
Likes
답글
조회 수
Likes
답글