Are you trying to populate values that are displayed in a HTL front end component?
Are you trying to populate values that are displayed in a HTL front end component? -> Nope
I want populate content for dialog component which base on node name and resourType.
----------------------
Thanks for your quick reply. Let me rephrase it there.
I have a page template which is using HTL. The page components will be rendered via code bellow code.
<div data-sly-resource="${ field.variable @ resourceType=field.fieldType,description=field.description, variable=field.variable,decorationTagName='div'}"></div>
It will render a list of component there. In the list of component I have a special component which is call Dropdown field.
It has dialog config look like
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Dialog"
title="Dropdown field"
xtype="panel">
<items jcr:primaryType="cq:WidgetCollection">
<content
jcr:primaryType="cq:Widget"
fieldLabel="Content Data"
fieldDescription="Output JSON data"
name="./content"
options="$PATH.option.json"
type="select"
xtype="selection"/>
</items>
</jcr:root>
My issue that is populate content data for this selection/dropdown in the component dialog. My servlet rely on node name and resourceType of this component to populate/resolve content data for the selection/dropdown in the dialog.
I had googled with these key words bellow but not help much.
"aem resourceType force create node"
"how to pass value to AEM widget dialog"
P/S:
Full rendering page HTL code
<div data-sly-list.field="${model.listContentField}">
<div data-sly-test.hasData="${field}" style="margin-top: 25px">
<fieldset>
<legend data-sly-test="${field.required}" style="color: chocolate" data-sly-text="${field.description} || Required field"></legend>
<legend data-sly-test="${!field.required}" data-sly-text="${field.description}"></legend>
<div data-sly-resource="${ field.variable @ resourceType=field.fieldType,description=field.description, variable=field.variable,decorationTagName='div'}"></div>
</fieldset>
</div>
</div>
Regards & Thanks,
Hung Vu