Not able add multiple Parsys using model
Hi All,
I'm working on a component which will add multiple parsys, via Sling Model. The parsys isn't generating but any html apart from that is working as expected.
Java
@586265
private Integer pNumber; //input
public String getPContent() {
StringBuilder contentBuilder = new StringBuilder();
for (int i = 1; i <= pNumber; i++) {
contentBuilder.append("<div data-sly-resource=\"${'parsys").append(i).append("' @ resourceType='wcm/foundation/components/parsys'}\"></div>");
}
return contentBuilder.toString();
}
HTML
<div data-sly-use.model="com.example.models.componentImpl">
${model.pContent @ context='unsafe'}
</div>
Output when parsys is used(context = unsafe)

Thus, please advice me as what I'm doing wrong or I missed something & help me to achieve desired result.
Thanks,
sesmic

