cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

add a suggestionbox in the create part wizard

ipochi
1-Newbie

add a suggestionbox in the create part wizard

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

5 REPLIES 5

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

ipochi
1-Newbie
(To:ipochi)

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

ipochi
1-Newbie
(To:ipochi)

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));

}

Top Tags