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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

datautility for a non single-value constraint attribute

cfrancis
5-Regular Member

datautility for a non single-value constraint attribute

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;

1 REPLY 1
mgupta-2
6-Contributor
(To:cfrancis)

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

Top Tags