Java Code Examples for com.smartgwt.client.widgets.form.fields.SelectItem#setMultiple()
The following examples show how to use
com.smartgwt.client.widgets.form.fields.SelectItem#setMultiple() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public static SelectItem newEmailSelector(String name, String title) { final SelectItem selector = new SelectItem(filterItemName(name)); selector.setTitle(I18N.message(title)); selector.setWrapTitle(false); selector.setValueField("email"); selector.setDisplayField("email"); selector.setPickListWidth(350); selector.setMultiple(true); selector.setHideEmptyPickList(true); ListGridField email = new ListGridField("email", I18N.message("email")); email.setWidth("*"); ListGridField firstName = new ListGridField("firstName", I18N.message("firstname")); firstName.setWidth(90); ListGridField lastName = new ListGridField("lastName", I18N.message("lastname")); lastName.setWidth(90); selector.setPickListFields(email, firstName, lastName); selector.setOptionDataSource(new ContactsDS()); return selector; }
Example 2
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public static SelectItem newEventSelector(String name, String title, final ChangedHandler handler, boolean folder, boolean workflow, boolean user) { final SelectItem select = newSelectItem(filterItemName(name), title); select.setWidth(350); select.setMultiple(false); select.setOptionDataSource(new EventsDS(folder, workflow, user)); select.setValueField("code"); select.setDisplayField("label"); if (handler != null) select.addChangedHandler(handler); PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, new FormItemClickHandler() { @Override public void onFormItemClick(FormItemIconClickEvent event) { select.clearValue(); select.setValue((String) null); if (handler != null) handler.onChanged(null); } }); select.setIcons(clear); select.setIconVAlign(VerticalAlignment.TOP); return select; }
Example 3
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public static SelectItem newTemplateSelector(boolean withEmpty, Long selectedTemplateId) { SelectItem templateItem = new SelectItem("template", I18N.message("template")); templateItem.setDisplayField("name"); templateItem.setValueField("id"); templateItem.setWidth(150); templateItem.setMultiple(false); templateItem.setWrapTitle(false); templateItem.setMultipleAppearance(MultipleAppearance.PICKLIST); templateItem.setOptionDataSource(new TemplatesDS(withEmpty, selectedTemplateId, null)); if (!Feature.enabled(Feature.TEMPLATE)) templateItem.setDisabled(true); if (selectedTemplateId != null) templateItem.setValue(selectedTemplateId.toString()); return templateItem; }
Example 4
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
/** * Creates a select list with the barcode templates * * @param withEmpty id an empty row must be shown * @param filterTemplateId the document template id to filter the ocr * templates * @param selectedTemplateId identifier of the template to be selected by * default * * @return the item */ public static SelectItem newBarcodeTemplateSelector(boolean withEmpty, Long filterTemplateId, Long selectedTemplateId) { SelectItem templateItem = new SelectItem("barcodetemplate", I18N.message("barcodetemplate")); templateItem.setDisplayField("name"); templateItem.setValueField("id"); templateItem.setWidth(150); templateItem.setMultiple(false); templateItem.setWrapTitle(false); templateItem.setMultipleAppearance(MultipleAppearance.PICKLIST); templateItem.setOptionDataSource(new BarcodeTemplatesDS(withEmpty, filterTemplateId)); if (selectedTemplateId != null) templateItem.setValue(selectedTemplateId.toString()); return templateItem; }
Example 5
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newTagsMultiplePickList(String name, String title, TagsDS options, Object[] tags) { final SelectItem item = newSelectItem(name, title); item.setMultiple(true); item.setMultipleAppearance(MultipleAppearance.PICKLIST); item.setValueField("word"); item.setDisplayField("word"); item.setOptionDataSource(options); if (tags != null) item.setValue(tags); return item; }
Example 6
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newMultipleSelector(String name, String title) { SelectItem selectItemMultipleGrid = new SelectItem(); selectItemMultipleGrid.setName(filterItemName(name)); selectItemMultipleGrid.setTitle(I18N.message(title)); selectItemMultipleGrid.setMultiple(true); selectItemMultipleGrid.setValueMap(""); return selectItemMultipleGrid; }
Example 7
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newEventsSelector(String name, String title, final ChangedHandler handler, boolean folder, boolean workflow, boolean user) { final SelectItem select = newMultipleSelector(filterItemName(name), title); select.setWidth(350); select.setHeight(250); select.setMultipleAppearance(MultipleAppearance.GRID); select.setMultiple(true); select.setOptionDataSource(new EventsDS(folder, workflow, user)); select.setValueField("code"); select.setDisplayField("label"); if (handler != null) select.addChangedHandler(handler); PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, new FormItemClickHandler() { @Override public void onFormItemClick(FormItemIconClickEvent event) { select.clearValue(); select.setValue((String) null); if (handler != null) handler.onChanged(null); } }); select.setIcons(clear); select.setIconVAlign(VerticalAlignment.TOP); return select; }
Example 8
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newSelectItem(String name, String title) { SelectItem select = newMultipleSelector(filterItemName(name), title != null ? I18N.message(title) : I18N.message(name)); select.setMultiple(false); select.setWrapTitle(false); return select; }
Example 9
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newConversionFormatItem(String fileName) { SelectItem select = ItemFactory.newSelectItem("format", I18N.message("format")); select.setMultiple(false); select.setWrapTitle(false); select.setOptionDataSource(new ConversionFormatsDS(fileName)); select.setValueField("extension"); select.setDisplayField("extension"); return select; }
Example 10
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
/** * Creates a select list with the OCR templates * * @param withEmpty id an empty row must be shown * @param filterTemplateId the document template id to filter the ocr * templates * @param selectedTemplateId identifier of the template to be selected by * default * * @return the item */ public static SelectItem newOCRTemplateSelector(boolean withEmpty, Long filterTemplateId, Long selectedTemplateId) { SelectItem templateItem = new SelectItem("ocrtemplate", I18N.message("ocrtemplate")); templateItem.setDisplayField("name"); templateItem.setValueField("id"); templateItem.setWidth(150); templateItem.setMultiple(false); templateItem.setWrapTitle(false); templateItem.setMultipleAppearance(MultipleAppearance.PICKLIST); templateItem.setOptionDataSource(new OCRTemplatesDS(withEmpty, filterTemplateId)); if (selectedTemplateId != null) templateItem.setValue(selectedTemplateId.toString()); return templateItem; }
Example 11
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newAttributeSetSelector() { final SelectItem selectItem = new SelectItem("attributeset", I18N.message("attributeset")); selectItem.setMultiple(false); selectItem.setMultipleAppearance(MultipleAppearance.PICKLIST); selectItem.setDisplayField("name"); selectItem.setValueField("id"); selectItem.setWidth(120); selectItem.setOptionDataSource(new AttributeSetsDS(false, GUIAttributeSet.TYPE_DEFAULT)); selectItem.setWrapTitle(false); return selectItem; }
Example 12
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newAttributesSelector() { final SelectItem selectItem = new SelectItem("attributes", I18N.message("attributes")); selectItem.setMultiple(true); selectItem.setMultipleAppearance(MultipleAppearance.PICKLIST); selectItem.setDisplayField("label"); selectItem.setValueField("name"); selectItem.setPickListWidth(150); selectItem.setOptionDataSource(new AttributesDS()); selectItem.setWrapTitle(false); return selectItem; }
Example 13
Source File: WorkflowTasksView.java From proarc with GNU General Public License v3.0 | 4 votes |
private SelectItem createMultiSelectColumnFilter() { SelectItem options = new SelectItem(); options.setMultiple(true); options.setMultipleAppearance(MultipleAppearance.PICKLIST); return options; }