The purpose of this plug-in is to provide a local REST service to call geocodes services.
The httpTransport bean must be injected in context (see the plugin context xml file for example).
Set the properties to specify APIM gateway url, AM token url, and credentials.
Use the lutece @autocomplete macro, with the local suggestion URLs :
Example :
<@input type='date' id='birthdate' name='birthdate' />
<@input type='text' id='birthplace_code' name='birthplace_code' />
<@input type='text' id='birthplace' name='birthplace' />
<@autocomplete id="autocompleteBirthPlace" name="" itemValueFieldName="displayValue" suggestionsUrl="rest/geocodesclient/api/v1/cities?search=" suggestionsPath="result" itemTitleFieldNames='["value","codeZone"]' minimumInputLength=3 additionnalRequestParamInputId="birthdate" copyFields='[{"inputName":"birthplace_code","resultFieldName":"code"},{"inputName":"birthplace","resultFieldName":"value"}]' />
<@input type='text' id='birthcountry_code' name='birthcountry_code' />
<@input type='text' id='birthcountry' name='birthcountry' />
<@autocomplete id="autocompleteBirthCoutnry" name="" itemValueFieldName="value" suggestionsUrl="rest/geocodesclient/api/v1/countries?search=" suggestionsPath="result" itemTitleFieldNames='["value"]' minimumInputLength=3 additionnalRequestParamInputId="birthdate" copyFields='[{"inputName":"birthcountry_code","resultFieldName":"code"},{"inputName":"birthcountry","resultFieldName":"value"}]' />