Java Code Examples for com.smartgwt.client.widgets.form.fields.ComboBoxItem#setDisplayField()
The following examples show how to use
com.smartgwt.client.widgets.form.fields.ComboBoxItem#setDisplayField() .
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 ComboBoxItem newEmailComboSelector(String name, String title) { final ComboBoxItem selector = new ComboBoxItem(filterItemName(name)); selector.setTitle(I18N.message(title)); selector.setWrapTitle(false); selector.setValueField("email"); selector.setDisplayField("email"); selector.setPickListWidth(350); selector.setFetchDelay(2000); 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: DigitalObjectAdministrationEditor.java From proarc with GNU General Public License v3.0 | 4 votes |
public PlainEditor(ClientMessages i18n) { widget = new VLayout(); form = new DynamicForm(); form.setDataSource(DigitalObjectAdministrationDataSource.getInstance()); form.setBrowserSpellCheck(false); TextItem pid = new TextItem(DigitalObjectAdministrationDataSource.FIELD_PID, i18n.DigitalObjectEditor_AdministrationEditor_Pid_Title()); pid.setWidth("*"); pid.setCanEdit(Boolean.FALSE); TextItem model = new TextItem(DigitalObjectAdministrationDataSource.FIELD_MODEL, i18n.DigitalObjectEditor_AdministrationEditor_Model_Title()); model.setCanEdit(Boolean.FALSE); TextItem owner = new TextItem(DigitalObjectAdministrationDataSource.FIELD_OWNER, i18n.DigitalObjectEditor_AdministrationEditor_Owner_Title()); owner.setCanEdit(Boolean.FALSE); TextItem creationDate = new TextItem(DigitalObjectAdministrationDataSource.FIELD_CREATED, i18n.DigitalObjectEditor_AdministrationEditor_Created_Title()); creationDate.setCanEdit(Boolean.FALSE); TextItem modificationDate = new TextItem(DigitalObjectAdministrationDataSource.FIELD_MODIFIED, i18n.DigitalObjectEditor_AdministrationEditor_Modified_Title()); modificationDate.setCanEdit(Boolean.FALSE); SelectItem device = new SelectItem(DigitalObjectAdministrationDataSource.FIELD_DEVICE, i18n.DigitalObjectEditor_AdministrationEditor_Device_Title()); device.setWidth(250); DeviceDataSource.setOptionDataSource(device); device.setAllowEmptyValue(true); device.setEmptyDisplayValue(ClientUtils.format("<i><%s></i>", i18n.DigitalObjectEditor_AdministrationEditor_NoDeviceSelection_Title())); TextItem filename = new TextItem(DigitalObjectAdministrationDataSource.FIELD_FILENAME, i18n.DigitalObjectEditor_AdministrationEditor_File_Title()); filename.setWidth("*"); filename.setCanEdit(Boolean.FALSE); TextItem export = new TextItem(DigitalObjectAdministrationDataSource.FIELD_EXPORT, i18n.DigitalObjectEditor_AdministrationEditor_Export_Title()); export.setWidth("*"); export.setCanEdit(Boolean.FALSE); TextItem ndkExport = new TextItem(DigitalObjectAdministrationDataSource.FIELD_NDK_EXPORT, i18n.DigitalObjectEditor_AdministrationEditor_Ndk_Export_Title()); ndkExport.setWidth("*"); ndkExport.setCanEdit(Boolean.FALSE); TextItem archiveExport = new TextItem(DigitalObjectAdministrationDataSource.FIELD_ARCHIVE_EXPORT, i18n.DigitalObjectEditor_AdministrationEditor_Archive_Export_Title()); archiveExport.setWidth("*"); archiveExport.setCanEdit(Boolean.FALSE); TextItem krameriusExport = new TextItem(DigitalObjectAdministrationDataSource.FIELD_KRAMERIUS_EXPORT, i18n.DigitalObjectEditor_AdministrationEditor_Kramerius_Export_Title()); krameriusExport.setWidth("*"); krameriusExport.setCanEdit(Boolean.FALSE); TextItem crossrefExport = new TextItem(DigitalObjectAdministrationDataSource.FIELD_CROSSREF_EXPORT, i18n.DigitalObjectEditor_AdministrationEditor_Crossref_Export_Title()); crossrefExport.setWidth("*"); crossrefExport.setCanEdit(Boolean.FALSE); ComboBoxItem organization = new ComboBoxItem(DigitalObjectAdministrationDataSource.FIELD_ORGANIZATION, i18n.UsersView_ListHeader_Organization_Title()); organization.setWidth(250); organization.setValueMap(Organization.getMap()); ComboBoxItem user = new ComboBoxItem(DigitalObjectAdministrationDataSource.FIELD_USER, i18n.UsersView_ListHeader_Proccesor_Title()); user.setWidth(250); user.setOptionDataSource(UserDataSource.getInstance()); user.setValueField(UserDataSource.FIELD_USERNAME); user.setDisplayField(UserDataSource.FIELD_USERNAME); ComboBoxItem status = new ComboBoxItem(DigitalObjectAdministrationDataSource.FIELD_STATUS, i18n.DigitalObjectEditor_AdministrationEditor_Status_Title()); status.setWidth(250); status.setValueMap(DigitalObjectState.getMap(i18n)); form.setItems(pid, model, owner, creationDate, modificationDate, device, filename, export, ndkExport, krameriusExport, archiveExport, crossrefExport, organization, user, status); widget.setMembers(form); }