Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi ,
I'm trying to achieve below auto suggestion example with my IBA values , could you please extend your support here ?
Thanks,
Vishvanatha
Originally posted as a new reply on this topic.
Solved! Go to Solution.
Hi @avillanueva
Autosugestion is more complicated. It is not just set the enumerated constrain.
You can check a help where is an example how to do so.
Configuring Auto-Suggest Results
Create class that extends com.ptc.core.components.suggest.Suggestable
public Collection<SuggestResult> getSuggestions(SuggestParms suggestParams)
{
ArrayList suggestList = new ArrayList();
String searchKey = suggestParams.getSearchTerm().toUpperCase();
suggestList.addAll(getResultsByKey(searchKey)); // getResultsByKey is a CODE WHERE THE SEARCH IS DONE returns a List
return suggestList;
}
Add a services to service.properties
wt.services/svc/default/com.ptc.core.components.suggest.Suggestable/serviceMYOWNSuggestionHelper/null/0=com.ext..MYOWNSuggestionHelper/duplicate
use the service in a DataUtility (how to create DU Create a Data Utility)
SuggestTextBox suggest = new SuggestTextBox(component_id, "serviceMYOWNSuggestionHelper");
Hope this can help you.
Example>
PetrH
I believe this is done with constraints:
In the Type and Attribute Manager
Hi @avillanueva
Autosugestion is more complicated. It is not just set the enumerated constrain.
You can check a help where is an example how to do so.
Configuring Auto-Suggest Results
Create class that extends com.ptc.core.components.suggest.Suggestable
public Collection<SuggestResult> getSuggestions(SuggestParms suggestParams)
{
ArrayList suggestList = new ArrayList();
String searchKey = suggestParams.getSearchTerm().toUpperCase();
suggestList.addAll(getResultsByKey(searchKey)); // getResultsByKey is a CODE WHERE THE SEARCH IS DONE returns a List
return suggestList;
}
Add a services to service.properties
wt.services/svc/default/com.ptc.core.components.suggest.Suggestable/serviceMYOWNSuggestionHelper/null/0=com.ext..MYOWNSuggestionHelper/duplicate
use the service in a DataUtility (how to create DU Create a Data Utility)
SuggestTextBox suggest = new SuggestTextBox(component_id, "serviceMYOWNSuggestionHelper");
Hope this can help you.
Example>
PetrH