Skip to main content
1-Visitor
August 14, 2017
Question

Multivalued User Picker

  • August 14, 2017
  • 1 reply
  • 2868 views

Hi,

 

I have a custom attribute. Using Data Utilty I made the attribute multivalued.

The attribute is supposed to be a User Picker. 

I can not see User Picker(code written/datautility id registered/cache cleared)

 

Is it because we cannot have two Data Utility functions for the same attribute(Multivalued and Picker)?

1 reply

1-Visitor
August 14, 2017

What if you add a multiSelect as true?

 

	public void buildUserPickerConfig(final String component_id, final ModelContext mc) throws WTException
	{
		HashMap<String, Object> defaultProps = new HashMap<String, Object>();
		defaultProps.put("objectType", "wt.org.WTUser");
		defaultProps.put("pickedAttributes", "name");
		defaultProps.put("multiSelect", "true");
		defaultProps.put("showUserType", "ActiveOnly");
		defaultProps.put("readOnlyPickerTextBox", "false");
		defaultProps.put("showSuggestion", "true");
		defaultProps.put("suggestServiceKey", "DocUserPickerId");
		defaultProps.put("label", "Search for User");
		defaultProps.put("pickerTitle", "Search for User");

		HashMap<String, Object> customProps = new HashMap<String, Object>();
		if ("RDSupportEngineer".equalsIgnoreCase(component_id)) {
			customProps.put("pickerId",component_id);
			customProps.put("pickerCallback", "CustomPickerInputComponentCallback");
		}
		defaultProps.putAll(customProps);
		mc.getDescriptor().setProperties(defaultProps);
	}

 

ash1-VisitorAuthor
1-Visitor
August 17, 2017

Adding multiselect true lets me have more than one users at a time. But the requirement is to have a multi value i.e. to have individual users.. that shall be mapped to their respective attributes.