Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi ,
I am new to customization
I have a string attribute , which should pick up the from user input [like google search , autocomplete ] the valid list of values from the database.
Could anyone please tell me what would be way to go for this sort of customization.
Solved! Go to Solution.
Hello Imran,
I recently worked on SuggestTextBox. You will have to create a suggestion class (implementing Suggestable interface) which would basically do the query. This class should be registered as a service, This service could be called from suggestTextBox wrapper tag.
Below URLs might be useful to you:
Re: Configure Auto Suggest Picker (SuggestTextBox) on object creation page?
SuggestTextBox should work with multiple values
Best Regards,
Shirish
Have a look at SuggestTextBox.
Try following http://YOUR_WINDCHILL/Windchill/app/#ptc1/carambola/customization/examples/picker/suggest
Hello Imran,
I recently worked on SuggestTextBox. You will have to create a suggestion class (implementing Suggestable interface) which would basically do the query. This class should be registered as a service, This service could be called from suggestTextBox wrapper tag.
Below URLs might be useful to you:
Re: Configure Auto Suggest Picker (SuggestTextBox) on object creation page?
SuggestTextBox should work with multiple values
Best Regards,
Shirish
Björn Rüegg -> --> I went to the link , Yes its exactly what i want , although I am not sure how to copy that functionality or look at the source
Shirishkumar Morkhade
Thanks Guys ,
I'm just taking baby steps in Windchill or Flex PLM (just started) all the help is much appreciated.
Shirishkumar Morkhade - > "This service could be called from suggestTextBox wrapper tag." If you just give a small example how to , that would be much helpful , thank you.
First two steps are done
one more question.
Is this the same approach for the create part/document wizards ?
In this method we are overriding the JSP , is there a better way than overriding the jsp ?
You can have just a data utility to implement the suggest text box.
I don't have any manual. Just have a look at the source of following java code
Example with JSP:
com.ptc.carambola.tags.AutoSuggestSearchHelper
-> This one is registered
wt.services/svc/default/com.ptc.core.components.suggest.Suggestable/carambola_autosuggest_helper/null/0=com.ptc.carambola.tags.AutoSuggestSearchHelper/duplicate
And the JSP is under
codebase/netmarkets/jsp/carambola/customization/examples/picker/suggest.jsp
Example with Data Utiltiy
The Data Utility would look something like this:
SuggestTextBox localSuggestTextBox = new SuggestTextBox(component_id, "nameSuggestService");
localSuggestTextBox.setMinChars(2);
localSuggestTextBox.setRequired(true);
localSuggestTextBox.setColumnName(columnName);
localSuggestTextBox.setMaxResults(50);
localSuggestTextBox.setMaxLength(40);
localSuggestTextBox.setEnabled(true);
localSuggestTextBox.setWidth(40);
localSuggestTextBox.addParm("LANGUAGE", sLanguage);
if (paramModelContext.getDescriptorMode() == ComponentMode.EDIT || paramModelContext.getDescriptorMode() == ComponentMode.CREATE) {
localSuggestTextBox.setValue(currentValue);
} else {
localSuggestTextBox.setValue(localSuggestTextBox.getParm((String) value));
}