AEM Servlet for Drop down in page Properties tab
Hi,
I have a custom Tab in Page Properties with a drop down like folows:
<telefonAndOpeningHours
granite:class="cq-dialog-dropdown-showhide"
jcr:primaryType="nt:unstructured"
fieldLabel="telefonAndOpeningHours"
fieldDescription="telefonAndOpeningHours."
name="./area"
required="{Boolean}true"
sling:resourceType="granite/ui/components/coral/foundation/form/select">
<granite:data
jcr:primaryType="nt:unstructured"
cq-dialog-dropdown-showhide-target=".analytics-type-showhide-target"/>
<items jcr:primaryType="nt:unstructured">
<area1
jcr:primaryType="nt:unstructured"
text="area1"
value="area1"/>
<area2
jcr:primaryType="nt:unstructured"
text="area2"
value="area2"/>
<area3
jcr:primaryType="nt:unstructured"
text="area3"
value="area3"/>
</items>
</telefonAndOpeningHours>
The areas (area1, area2, area3...) are not static but are dynamic instead. They are custom conditions in content that I need to read and dynamically display as values in the drop down.
I was thinking about using a servlet for to determin the the areas titles in the dropdown but I am not sure how to configure the servlet for this purpose:
@Component(service = Servlet.class)
@SlingServletResourceTypes(
resourceTypes = "cq/Page",
selectors = {???}
)
t