Solution is to create for number field DataUtility that extends com.ptc.core.components.factory.dataUtilities.NumberDataUtility (default data utility for number field).
Code example for this data utility:
public Object getDataValue(String componentId, Object o, ModelContext modelContext) throws WTException {
GUIComponentArray guiComponentArray = new GUIComponentArray();
AttributeInputCompositeComponent numberInput = (AttributeInputCompositeComponent) super.getDataValue(componentId, o, modelContext);
guiComponentArray.addGUIComponent(numberInput);
PickerIconButton pickerIconButton = new PickerIconButton(WTMessage.getLocalizedMessage("someYourResourceBundle", "YOUR_PICKER_LABEL"));
pickerIconButton.setFieldId("number_picker");
pickerIconButton.setColumnName(componentId);
pickerIconButton.addStyleClass("pickerInputComponentFindButton");
pickerIconButton.addJsAction("onclick", createJsOnLickAction());
guiComponentArray.addGUIComponent(pickerIconButton);
return guiComponentArray;
}
private String createJsOnLickAction() {
StringBuilder onClickActionBuilder = new StringBuilder();
onClickActionBuilder.append("popupAction('launchPicker', 'path to your jsp where itemPicker is defined'");
onClickActionBuilder.append(", '', '', '', '', '', '', '', '', '', '', '', '', 'portlet', 'poppedup', 'context', null");
onClickActionBuilder.append(", 'oid', null, null, 'none', 'com.ptc.netmarkets.search.NmSearchCommands', 'callSearchPicker'");
onClickActionBuilder.append(", 'height=768,width=550', null, null, false, '', 'component', '', false, null");
onClickActionBuilder.append(")");
return onClickActionBuilder.toString();
}