Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
We currently have a datautility that provides a SuggestTextBox for an attribute. This provides a type ahead dropdown of allowable values for the field and cuts down on misspellings and acronymns. The request has been made to remove the "Single-Value" constraint on this attribute to allow multiple values. The datautility as it is written assumes that there is one and only one value. I'm looking for an example of how it would change if a additional attribute values are added on the creation and edit pages. It seems like there must be a way to name the fields so Windchill will accept the multiple values. Also our code appears to stop the + button from appearing.
Here is the existing code:
SuggestTextBox plantSuggestBox = new SuggestTextBox("Plant", "Plant_autosuggest");
plantSuggestBox.setRenderer(new SuggestTextBoxRenderer());
plantSuggestBox.setColumnName(getColumnName(arg0, arg1, modelContext));
plantSuggestBox.setMinChars(1);
plantSuggestBox.setMaxResults(50);
plantSuggestBox.setEditable(true);
plantSuggestBox.setId(arg0);
plantSuggestBox.setWidth(60);
plantSuggestBox.setRequired(true);
if(modelContext.getDescriptorMode().equals(ComponentMode.EDIT)){
try {
plantSuggestBox.setValue(getIBAAttrValue((IBAHolder)containerObject4, plantIbaName));
} catch (RemoteException ex) {
ex.printStackTrace();
}
}
guiComponentArray.addGUIComponent(plantSuggestBox);
component = guiComponentArray;
return component;
Hi Chris
Were you able to achieve this atleast with single value constraint ? I have same requirement and I am unable to persist the attribute value after selecting from suggestion list.
Regards
Mahesh