<aui:input name="skills" type="textarea" label="skills" >
<aui:validator name="required" />
</aui:input>
<aui:script use="autocomplete-list,aui-base,autocomplete-filters,autocomplete-highlighters">
var skills = [
{"name":"Java"},
{"name":"Alfresco"},
{"name":"HTML"},
{"name":"C++"},
{"name":"Liferay"},
{"name":"Python"},
{"name":"C"},
{"name":"SQL"},
{"name":"JavaScript"},
{"name":"C#"},
{"name":"PHP"},
{"name":"CSS"},
{"name":"Bootstrap"},
{"name":"jQuery"},
{"name":"AngularJS"},
{"name":"AJAX"}
];
new A.AutoCompleteList(
{
allowBrowserAutocomplete: 'false',
activateFirstItem: 'true',
inputNode: '#<portlet:namespace/>skills',
resultTextLocator: 'name',
resultHighlighter:'phraseMatch',
resultFilters: ['startsWith'],
minQueryLength: 1,
maxResults: 10,
queryDelimiter : ',',
render: 'true',
source:skills
});
</aui:script>
<aui:validator name="required" />
</aui:input>
<aui:script use="autocomplete-list,aui-base,autocomplete-filters,autocomplete-highlighters">
var skills = [
{"name":"Java"},
{"name":"Alfresco"},
{"name":"HTML"},
{"name":"C++"},
{"name":"Liferay"},
{"name":"Python"},
{"name":"C"},
{"name":"SQL"},
{"name":"JavaScript"},
{"name":"C#"},
{"name":"PHP"},
{"name":"CSS"},
{"name":"Bootstrap"},
{"name":"jQuery"},
{"name":"AngularJS"},
{"name":"AJAX"}
];
new A.AutoCompleteList(
{
allowBrowserAutocomplete: 'false',
activateFirstItem: 'true',
inputNode: '#<portlet:namespace/>skills',
resultTextLocator: 'name',
resultHighlighter:'phraseMatch',
resultFilters: ['startsWith'],
minQueryLength: 1,
maxResults: 10,
queryDelimiter : ',',
render: 'true',
source:skills
});
</aui:script>
No comments:
Post a Comment