/** * If true, when the pickList is showing, the user can select the current value by hitting the <code>Tab</code> key. * * @param completeOnTab completeOnTab Default value is null */ public void setCompleteOnTab(Boolean completeOnTab) { setAttribute("completeOnTab", completeOnTab); }
/** * Don't specify an explicit height for the picker icon - instead have it size to match the height of the combo box item. * * @param pickerIconHeight pickerIconHeight Default value is null */ public void setPickerIconHeight(Integer pickerIconHeight) { setAttribute("pickerIconHeight", pickerIconHeight); }
/** * If this item is part of a databound form, and has a specified <code>valueMap</code>, by default we show the valueMap * options in the pickList for the item. Setting this property to true will ensure that the options displayed in our * pickList are derived from the form's <code>dataSource</code>. * <p><b>Note : </b> This is an advanced setting</p> * * @param showOptionsFromDataSource showOptionsFromDataSource Default value is null * @see com.smartgwt.client.docs.Databinding Databinding overview and related methods */ public void setShowOptionsFromDataSource(Boolean showOptionsFromDataSource) { setAttribute("showOptionsFromDataSource", showOptionsFromDataSource); }
/** * If true, when the pickList is shown, it will be shown via an animated reveal effect <p><b>Note : </b> This is an * advanced setting</p> * * @param animatePickList animatePickList Default value is null */ public void setAnimatePickList(Boolean animatePickList) { setAttribute("animatePickList", animatePickList); }
/** * Show the picker icon for the ComboBox. * <p><b>Note : </b> This is an advanced setting</p> * * @param showPickerIcon showPickerIcon Default value is true */ public void setShowPickerIcon(Boolean showPickerIcon) { setAttribute("showPickerIcon", showPickerIcon); }
/** * If this form item maps data values to display values by retrieving the {@link * com.smartgwt.client.widgets.form.fields.FormItem#getDisplayField displayField} values from an {@link * com.smartgwt.client.widgets.form.fields.FormItem#getOptionDataSource optionDataSource}, this property denotes the the * field to use as the underlying data value in records from the optionDataSource.<br> If unset, assumed to be the {@link * com.smartgwt.client.widgets.form.fields.FormItem#getName name} of this form item. * * @param valueField valueField Default value is null */ public void setValueField(String valueField) { setAttribute("valueField", valueField); }
/** * Maximum height to show the pick list before it starts to scroll. Note that by default the pickList will be sized * to the height required by its content so it will be taller when more rows are available as selectable options * * @param pickListHeight pickListHeight Default value is 300 */ public void setPickListHeight(int pickListHeight) { setAttribute("pickListHeight", pickListHeight); }
/** * Height for an empty pick list (showing the empty message), if the pick list has no records and {@link * com.smartgwt.client.widgets.form.fields.PickList#getHideEmptyPickList hideEmptyPickList} is <code>false</code>. * * @param emptyPickListHeight emptyPickListHeight Default value is 100 */ public void setEmptyPickListHeight(int emptyPickListHeight) { setAttribute("emptyPickListHeight", emptyPickListHeight); }
/** * If this combo box retrieves its options from a <code>dataSource</code>, should options be fetched from the server when * the item is first written out, or should this fetch be delayed until the user opens the pickList. * <p><b>Note : </b> This is an advanced setting</p> * * @param autoFetchData autoFetchData Default value is false */ public void setAutoFetchData(Boolean autoFetchData) { setAttribute("autoFetchData", autoFetchData); }
/** * Src for the picker icon. * <p><b>Note : </b> This is an advanced setting</p> * * @param pickerIconSrc pickerIconSrc Default value is "[SKIN]/DynamicForm/ComboBoxItem_PickButton_icon.gif" */ public void setPickerIconSrc(String pickerIconSrc) { setAttribute("pickerIconSrc", pickerIconSrc); }
/** * If this pickList contains no options, should it be hidden? If unset, default behavior is to allow the empty * pickList to show if it is databound. * * @param hideEmptyPickList hideEmptyPickList Default value is null */ public void setHideEmptyPickList(Boolean hideEmptyPickList) { setAttribute("hideEmptyPickList", hideEmptyPickList); }
/** * Default width to show the pickList. If not specified, the width of this form item's element will be used * instead. * * @param pickListWidth pickListWidth Default value is null */ public void setPickListWidth(Integer pickListWidth) { setAttribute("pickListWidth", pickListWidth); }
/** * Base Style for pickList cells. As with ListGrid Cells, will have 'over', 'selected' and 'disabled' appended on * changes of state for the cells. * * @param pickListBaseStyle pickListBaseStyle Default value is "pickListCell" */ public void setPickListBaseStyle(String pickListBaseStyle) { setAttribute("pickListBaseStyle", pickListBaseStyle); }
/** * If this pick list is showing multiple fields, this property determines the height of the column headers for those * fields. Set to zero to suppress the headers entirely. * * @param pickListHeaderHeight pickListHeaderHeight Default value is 22 */ public void setPickListHeaderHeight(int pickListHeaderHeight) { setAttribute("pickListHeaderHeight", pickListHeaderHeight); }
/** * Should the list of options be displayed whenever the user types into the the combo-box textArea, or only when the user * clicks on the pick button or uses the explicit <code>Alt+Arrow Down</code> key combination? * * @param showPickListOnKeypress showPickListOnKeypress Default value is true */ public void setShowPickListOnKeypress(Boolean showPickListOnKeypress) { setAttribute("showPickListOnKeypress", showPickListOnKeypress); }
/** * Specifies the field by which this item should be initially sorted. Can be set to either a {@link * com.smartgwt.client.widgets.grid.ListGridField#getName 'field name'} or the index of the field in the fields Array. * Note that if <code>sortField</code> is initally specified as a number, it will be converted to a string (field name) * after the item is initialized. <P> To programmatically change sort field or direction after initialization, call * ${isc.DocUtils.linkForRef('sort')}. * * @param sortField sortField Default value is null */ public void setSortField(String sortField) { setAttribute("sortField", sortField); }
/** * When applying filter criteria to pickList data, what type of matching to use. <P> For a databound pickList ({@link * com.smartgwt.client.widgets.form.fields.ComboBoxItem#getOptionDataSource optionDataSource} set), * <code>textMatchStyle</code> is sent to the server as {@link com.smartgwt.client.data.DSRequest#getTextMatchStyle * textMatchStyle}. <P> For a non-databound pickList, <code>textMatchStyle</code> is applied by {@link * com.smartgwt.client.widgets.form.fields.ComboBoxItem#filterClientPickListData ComboBoxItem.filterClientPickListData}. * * @param textMatchStyle textMatchStyle Default value is "startsWith" */ public void setTextMatchStyle(TextMatchStyle textMatchStyle) { setAttribute("textMatchStyle", textMatchStyle.getValue()); }
/** * If this item has a databound pick-list (for example {@link com.smartgwt.client.widgets.form.fields.PickList#getOptionDataSource * optionDataSource} is set) this property can be used to provide static filter criteria when retrieving the data * for the pickList. <p><b>Note : </b> This is an advanced setting</p> * * @param pickListCriteria pickListCriteria Default value is null */ public void setPickListCriteria(Criteria pickListCriteria) { setAttribute("pickListCriteria", pickListCriteria == null ? null : pickListCriteria.getJsObj()); }
public ComboBoxItem(String name, String title) { setName(name); setTitle(title); setAttribute("editorType", "ComboBoxItem"); }
/** * Set the properties to be applied to the pickList created for this Form Item. * * @param pickListProperties the pick list properties */ public void setPickListProperties(ListGrid pickListProperties) { JavaScriptObject configJS = pickListProperties.getConfig(); JSOHelper.deleteAttribute(configJS, "ID"); JSOHelper.deleteAttribute(configJS, "alternateRecordStyles"); setAttribute("pickListProperties", configJS); }