DropDownFieldBase dropDownField = (DropDownFieldBase) dropDown;
DropDownPopup popup = dropDownField.getPopup();
ScriptBuilder buf = new ScriptBuilder();
TableStructure tableStructure = popup.getChildData().getTableStructure();
buf.initScript(context, dropDownField, "O$.DropDownField._init",
dropDownField.getTimeout(),
dropDownField.getListAlignment(),
Styles.getStyleClassesStr(context, dropDownField, dropDownField.getRolloverListItemStyle(),
dropDownField.getRolloverListItemClass(), DefaultStyles.getDefaultSelectionStyle(), StyleGroup.rolloverStyleGroup()),
getItemValuesArray(getItemValues(dropDown)),
dropDownField.getCustomValueAllowed(),
dropDownField.isRequired(),
dropDownField.getSuggestionMode(),
dropDownField.getSuggestionDelay(),
dropDownField.getSuggestionMinChars(),
isManualListOpeningAllowed(dropDownField),
dropDownField.getAutoComplete(),
dropDownField.getAttributes().get(ATTR_TOTAL_ITEM_COUNT),
dropDownField.getAttributes().get(ATTR_PAGE_SIZE),
tableStructure.getInitParam(context, POPUP_TABLE_DEFAULT_STYLES),
dropDownField.isCachingAllowed(),
getItemPresentationColumn(dropDown),
dropDownField.getChangeValueOnSelect()
);
popup.resetChildData();