icfnext / cq-component-maven-plugin

Other
22 stars 35 forks source link

Add optionsProperties to @Autocomplete #63

Open pete-by opened 7 years ago

pete-by commented 7 years ago

autocomplete component in Granite UI supports a remote source for the options, see /libs/granite/ui/components/foundation/form/autocomplete/list/list.jsp:

       * Example::
       *
       *    /path.html?start={start}&end={end}&query={query}&my-other-param=param1
       *
       * If this property is not set, the items are read from the DataSource.
       */
      - src (StringEL)

To use this feature the expected dialog field definition should be:

<options jcr:primaryType="nt:unstructured" 
sling:resourceType="granite/ui/components/foundation/form/autocomplete/list" 
src="/path.html?start={start}&amp;end={end}&amp;query={query}" />

Corresponding plugin's annotation for Touch UI:

@Autocomplete(
  ...
  optionsProperties = {
      @Property(name='src', value='/path.html?...')
  }

)