use of com.vaadin.v7.ui.ComboBox in project ANNIS by korpling.
the class AnnisUITest method searchPcc2InverseOrder.
@Test
void searchPcc2InverseOrder() throws Exception {
selectCorpus("pcc2");
// Set inverse order in search options
TabSheet optionTabSheet = _get(_get(ControlPanel.class), TabSheet.class);
optionTabSheet.setSelectedTab(_get(SearchOptionsPanel.class));
awaitCondition(10, () -> !_find(optionTabSheet, ComboBox.class, spec -> spec.withCaption("Order")).isEmpty());
@SuppressWarnings("unchecked") ComboBox<OrderEnum> orderComboBox = _get(optionTabSheet, ComboBox.class, spec -> spec.withCaption("Order"));
_setValue(orderComboBox, OrderEnum.INVERTED);
// Set the query and submit query
_get(AqlCodeEditor.class).getPropertyDataSource().setValue("\"Die\"");
MockVaadin.INSTANCE.clientRoundtrip();
awaitCondition(5, () -> "\"Die\"".equals(ui.getQueryState().getAql().getValue()));
awaitCondition(5, () -> "Valid query, click on \"Search\" to start searching.".equals(ui.getSearchView().getControlPanel().getQueryPanel().getLastPublicStatus()));
Button searchButton = _get(Button.class, spec -> spec.withCaption("Search"));
_click(searchButton);
// Wait until the count is displayed
String expectedStatus = "4 matches\nin 2 documents";
awaitCondition(60, () -> expectedStatus.equals(ui.getSearchView().getControlPanel().getQueryPanel().getLastPublicStatus()), () -> "Waited for status \"" + expectedStatus + "\" but was \"" + ui.getSearchView().getControlPanel().getQueryPanel().getLastPublicStatus() + "\"");
ResultViewPanel resultView = _get(ResultViewPanel.class);
awaitCondition(30, () -> _find(resultView, SingleResultPanel.class).size() == 4);
// Test that the cell values have the correct token value
SingleResultPanel resultPanel = _find(SingleResultPanel.class).get(0);
KWICComponent kwicVis = _get(resultPanel, KWICComponent.class);
AnnotationGrid kwicGrid = _get(kwicVis, AnnotationGrid.class);
ArrayList<Row> tokens = kwicGrid.getRowsByAnnotation().get("tok");
assertEquals(1, tokens.size());
assertEquals(Arrays.asList("fürs", "Dallgower", "Tor", "gab", ".", "Die", "Seeburger", "und", "einige", "Groß-Glienicker", "haben"), tokens.get(0).getEvents().stream().map(GridEvent::getValue).collect(Collectors.toList()));
}
use of com.vaadin.v7.ui.ComboBox in project SORMAS-Project by hzi-braunschweig.
the class ContactCreateForm method addFields.
@Override
protected void addFields() {
if (hasCaseRelation == null) {
return;
}
reportDate = addField(ContactDto.REPORT_DATE_TIME, DateField.class);
ComboBox cbDisease = addDiseaseField(ContactDto.DISEASE, false, true);
addField(ContactDto.DISEASE_DETAILS, TextField.class);
personCreateForm = new PersonCreateForm(false, false, false, showPersonSearchButton);
personCreateForm.setWidth(100, Unit.PERCENTAGE);
personCreateForm.setValue(new PersonDto());
getContent().addComponent(personCreateForm, ContactDto.PERSON);
addField(ContactDto.RETURNING_TRAVELER, NullableOptionGroup.class);
ComboBox region = addInfrastructureField(ContactDto.REGION);
ComboBox district = addInfrastructureField(ContactDto.DISTRICT);
ComboBox community = addInfrastructureField(ContactDto.COMMUNITY);
multiDayContact = addField(ContactDto.MULTI_DAY_CONTACT, CheckBox.class);
firstContactDate = addField(ContactDto.FIRST_CONTACT_DATE, DateField.class);
lastContactDate = addField(ContactDto.LAST_CONTACT_DATE, DateField.class);
firstContactDate.addValueChangeListener(event -> lastContactDate.setRequired(event.getProperty().getValue() != null));
multiDayContact.addValueChangeListener(event -> updateDateComparison());
List<AbstractField<Date>> validatedFields = Arrays.asList(firstContactDate, lastContactDate, reportDate);
validatedFields.forEach(field -> field.addValueChangeListener(r -> {
validatedFields.forEach(otherField -> {
otherField.setValidationVisible(!otherField.isValid());
});
}));
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.FIRST_CONTACT_DATE, ContactDto.MULTI_DAY_CONTACT, Collections.singletonList(true), true);
updateDateComparison();
contactProximity = addField(ContactDto.CONTACT_PROXIMITY, NullableOptionGroup.class);
contactProximity.removeStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);
if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) {
contactProximity.addValueChangeListener(e -> updateContactCategory((ContactProximity) contactProximity.getNullableValue()));
contactProximityDetails = addField(ContactDto.CONTACT_PROXIMITY_DETAILS, TextField.class);
contactCategory = addField(ContactDto.CONTACT_CATEGORY, NullableOptionGroup.class);
}
addField(ContactDto.DESCRIPTION, TextArea.class).setRows(4);
ComboBox relationToCase = addField(ContactDto.RELATION_TO_CASE, ComboBox.class);
addField(ContactDto.RELATION_DESCRIPTION, TextField.class);
addField(ContactDto.CASE_ID_EXTERNAL_SYSTEM, TextField.class);
addField(ContactDto.CASE_OR_EVENT_INFORMATION, TextArea.class).setRows(4);
CssStyles.style(CssStyles.SOFT_REQUIRED, firstContactDate, lastContactDate, contactProximity, relationToCase);
region.addValueChangeListener(e -> {
RegionReferenceDto regionDto = (RegionReferenceDto) e.getProperty().getValue();
FieldHelper.updateItems(district, regionDto != null ? FacadeProvider.getDistrictFacade().getAllActiveByRegion(regionDto.getUuid()) : null);
});
region.addItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry());
district.addValueChangeListener(e -> {
DistrictReferenceDto districtDto = (DistrictReferenceDto) e.getProperty().getValue();
FieldHelper.updateItems(community, districtDto != null ? FacadeProvider.getCommunityFacade().getAllActiveByDistrict(districtDto.getUuid()) : null);
});
setRequired(true, ContactDto.REPORT_DATE_TIME);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.RELATION_DESCRIPTION, ContactDto.RELATION_TO_CASE, Arrays.asList(ContactRelation.OTHER), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.DISEASE_DETAILS, ContactDto.DISEASE, Arrays.asList(Disease.OTHER), true);
FieldHelper.setRequiredWhen(getFieldGroup(), ContactDto.DISEASE, Arrays.asList(ContactDto.DISEASE_DETAILS), Arrays.asList(Disease.OTHER));
cbDisease.addValueChangeListener(e -> {
disease = (Disease) e.getProperty().getValue();
setVisible(disease != null, ContactDto.CONTACT_PROXIMITY);
if (isConfiguredServer("de")) {
contactCategory.setVisible(disease != null);
contactProximityDetails.setVisible(disease != null);
}
updateContactProximity();
});
if (!hasCaseRelation) {
Label caseInfoLabel = new Label(I18nProperties.getString(Strings.infoNoSourceCaseSelected), ContentMode.HTML);
Button chooseCaseButton = ButtonHelper.createButton(Captions.contactChooseCase, null, ValoTheme.BUTTON_PRIMARY, CssStyles.VSPACE_2);
Button removeCaseButton = ButtonHelper.createButton(Captions.contactRemoveCase, null, ValoTheme.BUTTON_LINK);
CssStyles.style(caseInfoLabel, CssStyles.VSPACE_TOP_4);
getContent().addComponent(caseInfoLabel, CASE_INFO_LOC);
chooseCaseButton.addClickListener(e -> {
ControllerProvider.getContactController().openSelectCaseForContactWindow((Disease) cbDisease.getValue(), selectedCase -> {
if (selectedCase != null) {
caseInfoLabel.setValue(String.format(I18nProperties.getString(Strings.infoContactCreationSourceCase), selectedCase.getPersonFirstName() + " " + selectedCase.getPersonLastName() + " " + "(" + DataHelper.getShortUuid(selectedCase.getUuid()) + ")"));
caseInfoLabel.removeStyleName(CssStyles.VSPACE_TOP_4);
removeCaseButton.setVisible(true);
chooseCaseButton.setCaption(I18nProperties.getCaption(Captions.contactChangeCase));
getValue().setCaze(selectedCase.toReference());
cbDisease.setValue(selectedCase.getDisease());
updateFieldVisibilitiesByCase(true);
}
});
});
getContent().addComponent(chooseCaseButton, CHOOSE_CASE_LOC);
removeCaseButton.addClickListener(e -> {
getValue().setCaze(null);
cbDisease.setValue(null);
caseInfoLabel.setValue(I18nProperties.getString(Strings.infoNoSourceCaseSelected));
caseInfoLabel.addStyleName(CssStyles.VSPACE_TOP_4);
removeCaseButton.setVisible(false);
chooseCaseButton.setCaption(I18nProperties.getCaption(Captions.contactChooseCase));
updateFieldVisibilitiesByCase(false);
});
getContent().addComponent(removeCaseButton, REMOVE_CASE_LOC);
removeCaseButton.setVisible(false);
}
if (asSourceContact) {
setEnabled(false, ContactDto.DISEASE, ContactDto.DISEASE_DETAILS);
}
addValueChangeListener(e -> {
updateFieldVisibilitiesByCase(hasCaseRelation);
if (!hasCaseRelation && disease == null) {
setVisible(false, ContactDto.CONTACT_PROXIMITY);
if (isConfiguredServer("de")) {
contactCategory.setVisible(false);
contactProximityDetails.setVisible(false);
}
}
updateContactProximity();
if (asSourceContact) {
personCreateForm.setVisible(false);
personCreateForm.enablePersonFields(false);
TextField personNameField = addCustomField(PERSON_NAME_LOC, String.class, TextField.class);
personNameField.setCaption(I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.PERSON));
personNameField.setValue(getValue().getPerson().getCaption());
personNameField.setReadOnly(true);
}
});
}
use of com.vaadin.v7.ui.ComboBox in project SORMAS-Project by hzi-braunschweig.
the class ContactDataForm method addFields.
@SuppressWarnings("deprecation")
@Override
protected void addFields() {
if (viewMode == null) {
return;
}
Label contactDataHeadingLabel = new Label(I18nProperties.getString(Strings.headingContactData));
contactDataHeadingLabel.addStyleName(H3);
getContent().addComponent(contactDataHeadingLabel, CONTACT_DATA_HEADING_LOC);
Label followUpStausHeadingLabel = new Label(I18nProperties.getString(Strings.headingFollowUpStatus));
followUpStausHeadingLabel.addStyleName(H3);
getContent().addComponent(followUpStausHeadingLabel, FOLLOW_UP_STATUS_HEADING_LOC);
addField(ContactDto.CONTACT_CLASSIFICATION, NullableOptionGroup.class);
addField(ContactDto.CONTACT_STATUS, NullableOptionGroup.class);
addField(ContactDto.UUID, TextField.class);
addField(ContactDto.EXTERNAL_ID, TextField.class);
TextField externalTokenField = addField(ContactDto.EXTERNAL_TOKEN, TextField.class);
Label externalTokenWarningLabel = new Label(I18nProperties.getString(Strings.messageContactExternalTokenWarning));
externalTokenWarningLabel.addStyleNames(VSPACE_3, LABEL_WHITE_SPACE_NORMAL);
getContent().addComponent(externalTokenWarningLabel, EXTERNAL_TOKEN_WARNING_LOC);
addField(ContactDto.INTERNAL_TOKEN, TextField.class);
addField(ContactDto.REPORTING_USER, ComboBox.class);
multiDayContact = addField(ContactDto.MULTI_DAY_CONTACT, CheckBox.class);
firstContactDate = addDateField(ContactDto.FIRST_CONTACT_DATE, DateField.class, 0);
lastContactDate = addField(ContactDto.LAST_CONTACT_DATE, DateField.class);
reportDate = addField(ContactDto.REPORT_DATE_TIME, DateField.class);
List<AbstractField<Date>> validatedFields = Arrays.asList(firstContactDate, lastContactDate, reportDate);
validatedFields.forEach(field -> field.addValueChangeListener(r -> {
validatedFields.forEach(otherField -> {
otherField.setValidationVisible(!otherField.isValid());
});
}));
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.FIRST_CONTACT_DATE, ContactDto.MULTI_DAY_CONTACT, Collections.singletonList(true), true);
initContactDateValidation();
addInfrastructureField(ContactDto.REPORTING_DISTRICT).addItems(FacadeProvider.getDistrictFacade().getAllActiveAsReference());
addField(ContactDto.CONTACT_IDENTIFICATION_SOURCE, ComboBox.class);
TextField contactIdentificationSourceDetails = addField(ContactDto.CONTACT_IDENTIFICATION_SOURCE_DETAILS, TextField.class);
contactIdentificationSourceDetails.setInputPrompt(I18nProperties.getString(Strings.pleaseSpecify));
// contactIdentificationSourceDetails.setVisible(false);
ComboBox tracingApp = addField(ContactDto.TRACING_APP, ComboBox.class);
TextField tracingAppDetails = addField(ContactDto.TRACING_APP_DETAILS, TextField.class);
tracingAppDetails.setInputPrompt(I18nProperties.getString(Strings.pleaseSpecify));
// tracingAppDetails.setVisible(false);
if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) {
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.CONTACT_IDENTIFICATION_SOURCE_DETAILS, ContactDto.CONTACT_IDENTIFICATION_SOURCE, Arrays.asList(ContactIdentificationSource.OTHER), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.TRACING_APP, ContactDto.CONTACT_IDENTIFICATION_SOURCE, Arrays.asList(ContactIdentificationSource.TRACING_APP), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.TRACING_APP_DETAILS, ContactDto.TRACING_APP, Arrays.asList(TracingApp.OTHER), true);
}
contactProximity = addField(ContactDto.CONTACT_PROXIMITY, NullableOptionGroup.class);
contactProximity.setCaption(I18nProperties.getCaption(Captions.Contact_contactProximityLongForm));
contactProximity.removeStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);
if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) {
addField(ContactDto.CONTACT_PROXIMITY_DETAILS, TextField.class);
contactCategory = addField(ContactDto.CONTACT_CATEGORY, NullableOptionGroup.class);
contactProximity.addValueChangeListener(e -> {
if (getInternalValue().getContactProximity() != e.getProperty().getValue() || contactCategory.isModified()) {
updateContactCategory((ContactProximity) contactProximity.getNullableValue());
}
});
}
ComboBox relationToCase = addField(ContactDto.RELATION_TO_CASE, ComboBox.class);
addField(ContactDto.RELATION_DESCRIPTION, TextField.class);
cbDisease = addDiseaseField(ContactDto.DISEASE, false);
cbDisease.setNullSelectionAllowed(false);
addField(ContactDto.DISEASE_DETAILS, TextField.class);
addField(ContactDto.PROHIBITION_TO_WORK, NullableOptionGroup.class).addStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);
DateField prohibitionToWorkFrom = addField(ContactDto.PROHIBITION_TO_WORK_FROM);
DateField prohibitionToWorkUntil = addDateField(ContactDto.PROHIBITION_TO_WORK_UNTIL, DateField.class, -1);
FieldHelper.setVisibleWhen(getFieldGroup(), Arrays.asList(ContactDto.PROHIBITION_TO_WORK_FROM, ContactDto.PROHIBITION_TO_WORK_UNTIL), ContactDto.PROHIBITION_TO_WORK, YesNoUnknown.YES, true);
prohibitionToWorkFrom.addValidator(new DateComparisonValidator(prohibitionToWorkFrom, prohibitionToWorkUntil, true, false, I18nProperties.getValidationError(Validations.beforeDate, prohibitionToWorkFrom.getCaption(), prohibitionToWorkUntil.getCaption())));
prohibitionToWorkUntil.addValidator(new DateComparisonValidator(prohibitionToWorkUntil, prohibitionToWorkFrom, false, false, I18nProperties.getValidationError(Validations.afterDate, prohibitionToWorkUntil.getCaption(), prohibitionToWorkFrom.getCaption())));
quarantine = addField(ContactDto.QUARANTINE);
quarantine.addValueChangeListener(e -> onQuarantineValueChange());
quarantineFrom = addField(ContactDto.QUARANTINE_FROM, DateField.class);
dfQuarantineTo = addDateField(ContactDto.QUARANTINE_TO, DateField.class, -1);
quarantineFrom.addValidator(new DateComparisonValidator(quarantineFrom, dfQuarantineTo, true, false, I18nProperties.getValidationError(Validations.beforeDate, quarantineFrom.getCaption(), dfQuarantineTo.getCaption())));
dfQuarantineTo.addValidator(new DateComparisonValidator(dfQuarantineTo, quarantineFrom, false, false, I18nProperties.getValidationError(Validations.afterDate, dfQuarantineTo.getCaption(), quarantineFrom.getCaption())));
quarantineChangeComment = addField(ContactDto.QUARANTINE_CHANGE_COMMENT);
dfPreviousQuarantineTo = addDateField(ContactDto.PREVIOUS_QUARANTINE_TO, DateField.class, -1);
setReadOnly(true, ContactDto.PREVIOUS_QUARANTINE_TO);
setVisible(false, ContactDto.QUARANTINE_CHANGE_COMMENT, ContactDto.PREVIOUS_QUARANTINE_TO);
quarantineOrderedVerbally = addField(ContactDto.QUARANTINE_ORDERED_VERBALLY, CheckBox.class);
CssStyles.style(quarantineOrderedVerbally, CssStyles.FORCE_CAPTION);
addField(ContactDto.QUARANTINE_ORDERED_VERBALLY_DATE, DateField.class);
quarantineOrderedOfficialDocument = addField(ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT, CheckBox.class);
CssStyles.style(quarantineOrderedOfficialDocument, CssStyles.FORCE_CAPTION);
addField(ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT_DATE, DateField.class);
CheckBox quarantineOfficialOrderSent = addField(ContactDto.QUARANTINE_OFFICIAL_ORDER_SENT, CheckBox.class);
CssStyles.style(quarantineOfficialOrderSent, FORCE_CAPTION);
addField(ContactDto.QUARANTINE_OFFICIAL_ORDER_SENT_DATE, DateField.class);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_OFFICIAL_ORDER_SENT, ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT, Collections.singletonList(Boolean.TRUE), true);
cbQuarantineExtended = addField(ContactDto.QUARANTINE_EXTENDED, CheckBox.class);
cbQuarantineExtended.setEnabled(false);
cbQuarantineExtended.setVisible(false);
CssStyles.style(cbQuarantineExtended, CssStyles.FORCE_CAPTION);
cbQuarantineReduced = addField(ContactDto.QUARANTINE_REDUCED, CheckBox.class);
cbQuarantineReduced.setEnabled(false);
cbQuarantineReduced.setVisible(false);
CssStyles.style(cbQuarantineReduced, CssStyles.FORCE_CAPTION);
TextField quarantineHelpNeeded = addField(ContactDto.QUARANTINE_HELP_NEEDED, TextField.class);
quarantineHelpNeeded.setInputPrompt(I18nProperties.getString(Strings.pleaseSpecify));
TextField quarantineTypeDetails = addField(ContactDto.QUARANTINE_TYPE_DETAILS, TextField.class);
quarantineTypeDetails.setInputPrompt(I18nProperties.getString(Strings.pleaseSpecify));
addField(ContactDto.QUARANTINE_HOME_POSSIBLE, NullableOptionGroup.class);
addField(ContactDto.QUARANTINE_HOME_POSSIBLE_COMMENT, TextField.class);
addField(ContactDto.QUARANTINE_HOME_SUPPLY_ENSURED, NullableOptionGroup.class);
addField(ContactDto.QUARANTINE_HOME_SUPPLY_ENSURED_COMMENT, TextField.class);
FieldHelper.setVisibleWhen(getFieldGroup(), Arrays.asList(ContactDto.QUARANTINE_FROM, ContactDto.QUARANTINE_TO, ContactDto.QUARANTINE_HELP_NEEDED), ContactDto.QUARANTINE, QuarantineType.QUARANTINE_IN_EFFECT, true);
if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY) || isConfiguredServer(CountryHelper.COUNTRY_CODE_SWITZERLAND)) {
FieldHelper.setVisibleWhen(getFieldGroup(), Arrays.asList(ContactDto.QUARANTINE_ORDERED_VERBALLY, ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT), ContactDto.QUARANTINE, QuarantineType.QUARANTINE_IN_EFFECT, true);
}
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_HOME_POSSIBLE_COMMENT, ContactDto.QUARANTINE_HOME_POSSIBLE, Arrays.asList(YesNoUnknown.NO), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_HOME_SUPPLY_ENSURED, ContactDto.QUARANTINE_HOME_POSSIBLE, Arrays.asList(YesNoUnknown.YES), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_HOME_SUPPLY_ENSURED_COMMENT, ContactDto.QUARANTINE_HOME_SUPPLY_ENSURED, Arrays.asList(YesNoUnknown.NO), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_TYPE_DETAILS, ContactDto.QUARANTINE, Arrays.asList(QuarantineType.OTHER), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_ORDERED_VERBALLY_DATE, ContactDto.QUARANTINE_ORDERED_VERBALLY, Arrays.asList(Boolean.TRUE), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT_DATE, ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT, Arrays.asList(Boolean.TRUE), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.QUARANTINE_OFFICIAL_ORDER_SENT_DATE, ContactDto.QUARANTINE_OFFICIAL_ORDER_SENT, Collections.singletonList(Boolean.TRUE), true);
addField(ContactDto.DESCRIPTION, TextArea.class).setRows(6);
addField(ContactDto.VACCINATION_STATUS);
addField(ContactDto.RETURNING_TRAVELER, NullableOptionGroup.class);
addField(ContactDto.CASE_ID_EXTERNAL_SYSTEM, TextField.class);
addField(ContactDto.CASE_OR_EVENT_INFORMATION, TextArea.class).setRows(4);
addField(ContactDto.FOLLOW_UP_STATUS, ComboBox.class);
addField(ContactDto.FOLLOW_UP_STATUS_CHANGE_DATE);
addField(ContactDto.FOLLOW_UP_STATUS_CHANGE_USER);
addField(ContactDto.FOLLOW_UP_COMMENT, TextArea.class).setRows(3);
dfFollowUpUntil = addDateField(ContactDto.FOLLOW_UP_UNTIL, DateField.class, -1);
dfFollowUpUntil.addValueChangeListener(v -> onFollowUpUntilChanged(v, dfQuarantineTo, cbQuarantineExtended, cbQuarantineReduced));
cbOverwriteFollowUpUntil = addField(ContactDto.OVERWRITE_FOLLOW_UP_UTIL, CheckBox.class);
cbOverwriteFollowUpUntil.addValueChangeListener(e -> {
if (!(Boolean) e.getProperty().getValue()) {
dfFollowUpUntil.discard();
}
});
dfQuarantineTo.addValueChangeListener(e -> onQuarantineEndChange());
addValueChangeListener(e -> {
ValidationUtils.initComponentErrorValidator(externalTokenField, getValue().getExternalToken(), Validations.duplicateExternalToken, externalTokenWarningLabel, (externalToken) -> FacadeProvider.getContactFacade().doesExternalTokenExist(externalToken, getValue().getUuid()));
onQuarantineValueChange();
});
ComboBox contactOfficerField = addField(ContactDto.CONTACT_OFFICER, ComboBox.class);
contactOfficerField.setNullSelectionAllowed(true);
ComboBox region = addInfrastructureField(ContactDto.REGION);
region.setDescription(I18nProperties.getPrefixDescription(ContactDto.I18N_PREFIX, ContactDto.REGION));
ComboBox district = addInfrastructureField(ContactDto.DISTRICT);
district.setDescription(I18nProperties.getPrefixDescription(ContactDto.I18N_PREFIX, ContactDto.DISTRICT));
ComboBox community = addInfrastructureField(ContactDto.COMMUNITY);
community.setDescription(I18nProperties.getPrefixDescription(ContactDto.I18N_PREFIX, ContactDto.COMMUNITY));
region.addValueChangeListener(e -> {
RegionReferenceDto regionDto = (RegionReferenceDto) e.getProperty().getValue();
FieldHelper.updateItems(district, regionDto != null ? FacadeProvider.getDistrictFacade().getAllActiveByRegion(regionDto.getUuid()) : null);
});
district.addValueChangeListener(e -> {
DistrictReferenceDto districtDto = (DistrictReferenceDto) e.getProperty().getValue();
FieldHelper.updateItems(community, districtDto != null ? FacadeProvider.getCommunityFacade().getAllActiveByDistrict(districtDto.getUuid()) : null);
List<DistrictReferenceDto> officerDistricts = new ArrayList<>();
officerDistricts.add(districtDto);
if (districtDto == null && getValue().getCaze() != null) {
CaseDataDto caseDto = FacadeProvider.getCaseFacade().getCaseDataByUuid(getValue().getCaze().getUuid());
FieldHelper.updateOfficersField(contactOfficerField, caseDto, UserRight.CONTACT_RESPONSIBLE);
} else {
FieldHelper.updateItems(contactOfficerField, districtDto != null ? FacadeProvider.getUserFacade().getUserRefsByDistrict(districtDto, getSelectedDisease(), UserRight.CONTACT_RESPONSIBLE) : null);
}
});
region.addItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry());
CheckBox cbHighPriority = addField(ContactDto.HIGH_PRIORITY, CheckBox.class);
tfExpectedFollowUpUntilDate = new TextField();
tfExpectedFollowUpUntilDate.setCaption(I18nProperties.getCaption(Captions.Contact_expectedFollowUpUntil));
getContent().addComponent(tfExpectedFollowUpUntilDate, EXPECTED_FOLLOW_UP_UNTIL_DATE_LOC);
NullableOptionGroup ogImmunosuppressiveTherapyBasicDisease = addField(ContactDto.IMMUNOSUPPRESSIVE_THERAPY_BASIC_DISEASE, NullableOptionGroup.class);
addField(ContactDto.IMMUNOSUPPRESSIVE_THERAPY_BASIC_DISEASE_DETAILS, TextField.class);
NullableOptionGroup ogCareForPeopleOver60 = addField(ContactDto.CARE_FOR_PEOPLE_OVER_60, NullableOptionGroup.class);
cbDisease.addValueChangeListener(e -> updateDiseaseConfiguration((Disease) e.getProperty().getValue()));
HealthConditionsForm clinicalCourseForm = addField(ContactDto.HEALTH_CONDITIONS, HealthConditionsForm.class);
clinicalCourseForm.setCaption(null);
Label generalCommentLabel = new Label(I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.ADDITIONAL_DETAILS));
generalCommentLabel.addStyleName(H3);
getContent().addComponent(generalCommentLabel, GENERAL_COMMENT_LOC);
TextArea additionalDetails = addField(ContactDto.ADDITIONAL_DETAILS, TextArea.class);
additionalDetails.setRows(6);
additionalDetails.setDescription(I18nProperties.getPrefixDescription(ContactDto.I18N_PREFIX, ContactDto.ADDITIONAL_DETAILS, "") + "\n" + I18nProperties.getDescription(Descriptions.descGdpr));
CssStyles.style(additionalDetails, CssStyles.CAPTION_HIDDEN);
addField(ContactDto.DELETION_REASON);
addField(ContactDto.OTHER_DELETION_REASON, TextArea.class).setRows(3);
setVisible(false, ContactDto.DELETION_REASON, ContactDto.OTHER_DELETION_REASON);
addFields(ContactDto.END_OF_QUARANTINE_REASON, ContactDto.END_OF_QUARANTINE_REASON_DETAILS);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.END_OF_QUARANTINE_REASON_DETAILS, ContactDto.END_OF_QUARANTINE_REASON, Collections.singletonList(EndOfQuarantineReason.OTHER), true);
initializeVisibilitiesAndAllowedVisibilities();
initializeAccessAndAllowedAccesses();
setReadOnly(true, ContactDto.UUID, ContactDto.REPORTING_USER, ContactDto.CONTACT_STATUS, ContactDto.FOLLOW_UP_STATUS, ContactDto.FOLLOW_UP_STATUS_CHANGE_DATE, ContactDto.FOLLOW_UP_STATUS_CHANGE_USER);
FieldHelper.setRequiredWhen(getFieldGroup(), ContactDto.FOLLOW_UP_STATUS, Arrays.asList(ContactDto.FOLLOW_UP_COMMENT), Arrays.asList(FollowUpStatus.CANCELED, FollowUpStatus.LOST));
FieldHelper.setVisibleWhenSourceNotNull(getFieldGroup(), Arrays.asList(ContactDto.FOLLOW_UP_STATUS_CHANGE_DATE, ContactDto.FOLLOW_UP_STATUS_CHANGE_USER), ContactDto.FOLLOW_UP_STATUS_CHANGE_DATE, true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.RELATION_DESCRIPTION, ContactDto.RELATION_TO_CASE, Arrays.asList(ContactRelation.OTHER), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.IMMUNOSUPPRESSIVE_THERAPY_BASIC_DISEASE_DETAILS, ContactDto.IMMUNOSUPPRESSIVE_THERAPY_BASIC_DISEASE, Arrays.asList(YesNoUnknown.YES), true);
FieldHelper.setVisibleWhen(getFieldGroup(), ContactDto.DISEASE_DETAILS, ContactDto.DISEASE, Arrays.asList(Disease.OTHER), true);
FieldHelper.setRequiredWhen(getFieldGroup(), ContactDto.DISEASE, Arrays.asList(ContactDto.DISEASE_DETAILS), Arrays.asList(Disease.OTHER));
FieldHelper.setReadOnlyWhen(getFieldGroup(), Arrays.asList(ContactDto.FOLLOW_UP_UNTIL), ContactDto.OVERWRITE_FOLLOW_UP_UTIL, Arrays.asList(Boolean.FALSE), false, true);
FieldHelper.setRequiredWhen(getFieldGroup(), ContactDto.OVERWRITE_FOLLOW_UP_UTIL, Arrays.asList(ContactDto.FOLLOW_UP_UNTIL), Arrays.asList(Boolean.TRUE));
FieldHelper.setVisibleWhen(getFieldGroup(), Arrays.asList(ContactDto.FOLLOW_UP_UNTIL, ContactDto.OVERWRITE_FOLLOW_UP_UTIL), ContactDto.FOLLOW_UP_STATUS, Arrays.asList(FollowUpStatus.CANCELED, FollowUpStatus.COMPLETED, FollowUpStatus.FOLLOW_UP, FollowUpStatus.LOST), true);
initializeVisibilitiesAndAllowedVisibilities();
addValueChangeListener(e -> {
if (getValue() != null) {
CaseDataDto caseDto = null;
if (getValue().getCaze() != null) {
setVisible(false, ContactDto.DISEASE, ContactDto.CASE_ID_EXTERNAL_SYSTEM, ContactDto.CASE_OR_EVENT_INFORMATION);
caseDto = FacadeProvider.getCaseFacade().getCaseDataByUuid(getValue().getCaze().getUuid());
} else {
setRequired(true, ContactDto.DISEASE, ContactDto.REGION, ContactDto.DISTRICT);
}
updateDateComparison();
updateDiseaseConfiguration(getValue().getDisease());
updateFollowUpStatusComponents();
DistrictReferenceDto referenceDistrict = getValue().getDistrict() != null ? getValue().getDistrict() : caseDto != null ? caseDto.getDistrict() : null;
if (referenceDistrict != null) {
contactOfficerField.addItems(FacadeProvider.getUserFacade().getUserRefsByDistrict(referenceDistrict, getSelectedDisease(), UserRight.CONTACT_RESPONSIBLE));
}
getContent().removeComponent(TO_CASE_BTN_LOC);
if (getValue().getResultingCase() != null) {
// link to case
Link linkToData = ControllerProvider.getCaseController().createLinkToData(getValue().getResultingCase().getUuid(), I18nProperties.getCaption(Captions.contactOpenContactCase));
getContent().addComponent(linkToData, TO_CASE_BTN_LOC);
} else if (!ContactClassification.NO_CONTACT.equals(getValue().getContactClassification())) {
if (UserProvider.getCurrent().hasUserRight(UserRight.CONTACT_CONVERT)) {
toCaseButton = ButtonHelper.createButton(Captions.contactCreateContactCase);
toCaseButton.addStyleName(ValoTheme.BUTTON_LINK);
getContent().addComponent(toCaseButton, TO_CASE_BTN_LOC);
}
}
if (!isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) {
setVisible(false, ContactDto.IMMUNOSUPPRESSIVE_THERAPY_BASIC_DISEASE, ContactDto.IMMUNOSUPPRESSIVE_THERAPY_BASIC_DISEASE_DETAILS, ContactDto.CARE_FOR_PEOPLE_OVER_60);
} else {
ogImmunosuppressiveTherapyBasicDisease.addValueChangeListener(getHighPriorityValueChangeListener(cbHighPriority));
ogCareForPeopleOver60.addValueChangeListener(getHighPriorityValueChangeListener(cbHighPriority));
}
// Add follow-up until validator
FollowUpPeriodDto followUpPeriod = ContactLogic.getFollowUpStartDate(lastContactDate.getValue(), reportDate.getValue(), FacadeProvider.getSampleFacade().getByContactUuids(Collections.singletonList(getValue().getUuid())));
Date minimumFollowUpUntilDate = FollowUpLogic.calculateFollowUpUntilDate(followUpPeriod, null, FacadeProvider.getVisitFacade().getVisitsByContact(new ContactReferenceDto(getValue().getUuid())), FacadeProvider.getDiseaseConfigurationFacade().getFollowUpDuration(getSelectedDisease()), FacadeProvider.getFeatureConfigurationFacade().isPropertyValueTrue(FeatureType.CONTACT_TRACING, FeatureTypeProperty.ALLOW_FREE_FOLLOW_UP_OVERWRITE)).getFollowUpEndDate();
if (FacadeProvider.getFeatureConfigurationFacade().isPropertyValueTrue(FeatureType.CONTACT_TRACING, FeatureTypeProperty.ALLOW_FREE_FOLLOW_UP_OVERWRITE)) {
dfFollowUpUntil.addValueChangeListener(valueChangeEvent -> {
if (DateHelper.getEndOfDay(dfFollowUpUntil.getValue()).before(minimumFollowUpUntilDate)) {
dfFollowUpUntil.setComponentError(new ErrorMessage() {
@Override
public ErrorLevel getErrorLevel() {
return ErrorLevel.INFO;
}
@Override
public String getFormattedHtmlMessage() {
return I18nProperties.getValidationError(Validations.contactFollowUpUntilDateSoftValidation, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.FOLLOW_UP_UNTIL));
}
});
}
});
} else {
dfFollowUpUntil.addValidator(new DateRangeValidator(I18nProperties.getValidationError(Validations.contactFollowUpUntilDate), minimumFollowUpUntilDate, null, Resolution.DAY));
}
}
// Overwrite visibility for quarantine fields
if (!isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY) && !isConfiguredServer(CountryHelper.COUNTRY_CODE_SWITZERLAND)) {
setVisible(false, ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT, ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT_DATE, ContactDto.QUARANTINE_ORDERED_VERBALLY, ContactDto.QUARANTINE_ORDERED_VERBALLY_DATE, ContactDto.QUARANTINE_OFFICIAL_ORDER_SENT, ContactDto.QUARANTINE_OFFICIAL_ORDER_SENT_DATE);
}
});
setRequired(true, ContactDto.CONTACT_CLASSIFICATION, ContactDto.CONTACT_STATUS, ContactDto.REPORT_DATE_TIME);
FieldHelper.addSoftRequiredStyle(firstContactDate, lastContactDate, contactProximity, relationToCase);
}
use of com.vaadin.v7.ui.ComboBox in project SORMAS-Project by hzi-braunschweig.
the class ContactsFilterForm method addMoreFilters.
@Override
public void addMoreFilters(CustomLayout moreFiltersContainer) {
UserDto user = currentUserDto();
if (user.getRegion() == null) {
ComboBox regionField = addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.REGION, I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.REGION_UUID), 240));
regionField.addItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry());
}
ComboBox districtField = addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.DISTRICT, I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.DISTRICT_UUID), 240));
districtField.setDescription(I18nProperties.getDescription(Descriptions.descDistrictFilter));
ComboBox communityField = addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.COMMUNITY, I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.COMMUNITY_UUID), 240));
Label infoLabel = new Label(VaadinIcons.INFO_CIRCLE.getHtml(), ContentMode.HTML);
infoLabel.setSizeUndefined();
infoLabel.setDescription(I18nProperties.getString(Strings.infoContactsViewRegionDistrictFilter), ContentMode.HTML);
CssStyles.style(infoLabel, CssStyles.LABEL_XLARGE, CssStyles.LABEL_SECONDARY, AbstractFilterForm.FILTER_ITEM_STYLE);
moreFiltersContainer.addComponent(infoLabel, DISTRICT_INFO_LABEL_ID);
ComboBox officerField = addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.CONTACT_OFFICER, I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.CONTACT_OFFICER_UUID), 140));
officerField.addItems(fetchContactResponsiblesByRegion(currentUserDto().getRegion()));
addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.REPORTING_USER_ROLE, I18nProperties.getString(Strings.reportedBy), 140));
Field<?> followUpUntilTo = addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.FOLLOW_UP_UNTIL_TO, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.FOLLOW_UP_UNTIL), 200));
followUpUntilTo.removeAllValidators();
if (FacadeProvider.getConfigFacade().isExternalJournalActive()) {
addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.SYMPTOM_JOURNAL_STATUS, I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.SYMPTOM_JOURNAL_STATUS), 240));
}
addField(moreFiltersContainer, FieldConfiguration.pixelSized(ContactCriteria.VACCINATION_STATUS, 140));
addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.RELATION_TO_CASE, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.RELATION_TO_CASE), 200));
addField(moreFiltersContainer, ComboBox.class, FieldConfiguration.pixelSized(ContactCriteria.RETURNING_TRAVELER, 200));
addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.QUARANTINE_TYPE, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE), 140));
Field<?> quarantineTo = addField(moreFiltersContainer, FieldConfiguration.withCaptionAndPixelSized(ContactDto.QUARANTINE_TO, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE_TO), 140));
quarantineTo.removeAllValidators();
ComboBox birthDateYYYY = addField(moreFiltersContainer, ContactCriteria.BIRTHDATE_YYYY, ComboBox.class);
birthDateYYYY.setInputPrompt(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.BIRTH_DATE_YYYY));
birthDateYYYY.setWidth(140, Unit.PIXELS);
birthDateYYYY.addItems(DateHelper.getYearsToNow());
birthDateYYYY.setItemCaptionMode(AbstractSelect.ItemCaptionMode.ID_TOSTRING);
ComboBox birthDateMM = addField(moreFiltersContainer, ContactCriteria.BIRTHDATE_MM, ComboBox.class);
birthDateMM.setInputPrompt(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.BIRTH_DATE_MM));
birthDateMM.setWidth(140, Unit.PIXELS);
birthDateMM.addItems(DateHelper.getMonthsInYear());
ComboBox birthDateDD = addField(moreFiltersContainer, ContactCriteria.BIRTHDATE_DD, ComboBox.class);
birthDateDD.setInputPrompt(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.BIRTH_DATE_DD));
birthDateDD.setWidth(140, Unit.PIXELS);
if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) {
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.QUARANTINE_ORDERED_VERBALLY, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE_ORDERED_VERBALLY), null, CHECKBOX_STYLE));
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.QUARANTINE_ORDERED_OFFICIAL_DOCUMENT), null, CHECKBOX_STYLE));
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.QUARANTINE_NOT_ORDERED, I18nProperties.getCaption(Captions.contactQuarantineNotOrdered), null, CHECKBOX_STYLE));
}
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.ONLY_QUARANTINE_HELP_NEEDED, I18nProperties.getCaption(Captions.contactOnlyQuarantineHelpNeeded), null, CHECKBOX_STYLE));
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.ONLY_HIGH_PRIORITY_CONTACTS, I18nProperties.getCaption(Captions.contactOnlyHighPriorityContacts), null, CHECKBOX_STYLE));
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.WITH_EXTENDED_QUARANTINE, I18nProperties.getCaption(Captions.contactOnlyWithExtendedQuarantine), I18nProperties.getDescription(Descriptions.descContactOnlyWithExtendedQuarantine), CHECKBOX_STYLE));
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.WITH_REDUCED_QUARANTINE, I18nProperties.getCaption(Captions.contactOnlyWithReducedQuarantine), I18nProperties.getDescription(Descriptions.descContactOnlyWithReducedQuarantine), CHECKBOX_STYLE));
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.ONLY_CONTACTS_SHARING_EVENT_WITH_SOURCE_CASE, I18nProperties.getCaption(Captions.contactOnlyWithSharedEventWithSourceCase), null, CHECKBOX_STYLE));
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.ONLY_CONTACTS_FROM_OTHER_INSTANCES, I18nProperties.getCaption(Captions.contactOnlyFromOtherInstances), null, CHECKBOX_STYLE));
final JurisdictionLevel userJurisdictionLevel = UserRole.getJurisdictionLevel(UserProvider.getCurrent().getUserRoles());
if (userJurisdictionLevel != JurisdictionLevel.NATION && userJurisdictionLevel != JurisdictionLevel.NONE) {
addField(moreFiltersContainer, CheckBox.class, FieldConfiguration.withCaptionAndStyle(ContactCriteria.INCLUDE_CONTACTS_FROM_OTHER_JURISDICTIONS, I18nProperties.getCaption(Captions.contactInludeContactsFromOtherJurisdictions), I18nProperties.getDescription(Descriptions.descContactIncludeContactsFromOtherJurisdictions), CHECKBOX_STYLE));
}
moreFiltersContainer.addComponent(buildWeekAndDateFilter(), WEEK_AND_DATE_FILTER);
}
use of com.vaadin.v7.ui.ComboBox in project SORMAS-Project by hzi-braunschweig.
the class ContactsFilterForm method addFields.
@Override
protected void addFields() {
addField(FieldConfiguration.pixelSized(ContactIndexDto.CONTACT_CLASSIFICATION, 140));
addField(FieldConfiguration.pixelSized(ContactIndexDto.DISEASE, 140));
addField(FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.DISEASE_VARIANT, I18nProperties.getCaption(Captions.Contact_cazeDiseaseVariant), 140), ComboBox.class);
ComboBox caseClassificationField = addField(FieldConfiguration.pixelSized(ContactIndexDto.CASE_CLASSIFICATION, 140));
caseClassificationField.setDescription(I18nProperties.getPrefixCaption(ContactIndexDto.I18N_PREFIX, ContactIndexDto.CASE_CLASSIFICATION));
if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) {
addField(FieldConfiguration.pixelSized(ContactIndexDto.CONTACT_CATEGORY, 140));
}
addField(FieldConfiguration.pixelSized(ContactIndexDto.FOLLOW_UP_STATUS, 140));
TextField searchField = addField(FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.CONTACT_OR_CASE_LIKE, I18nProperties.getString(Strings.promptContactsSearchField), 200));
searchField.setNullRepresentation("");
TextField personLikeField = addField(FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.PERSON_LIKE, I18nProperties.getString(Strings.promptRelatedPersonLikeField), 200));
personLikeField.setNullRepresentation("");
TextField eventSearchField = addField(FieldConfiguration.withCaptionAndPixelSized(ContactCriteria.EVENT_LIKE, I18nProperties.getString(Strings.promptCaseOrContactEventSearchField), 200));
eventSearchField.setNullRepresentation("");
}
Aggregations