use of com.vaadin.v7.data.util.GeneratedPropertyContainer in project SORMAS-Project by hzi-braunschweig.
the class CaseSelectionGrid method buildGrid.
private void buildGrid() {
setSizeFull();
setSelectionMode(SelectionMode.SINGLE);
setHeightMode(HeightMode.ROW);
BeanItemContainer<CaseSelectionDto> container = new BeanItemContainer<>(CaseSelectionDto.class);
GeneratedPropertyContainer generatedContainer = new GeneratedPropertyContainer(container);
setContainerDataSource(generatedContainer);
setColumns(CaseSelectionDto.UUID, CaseSelectionDto.EPID_NUMBER, CaseSelectionDto.EXTERNAL_ID, CaseSelectionDto.PERSON_FIRST_NAME, CaseSelectionDto.PERSON_LAST_NAME, CaseSelectionDto.AGE_AND_BIRTH_DATE, CaseSelectionDto.RESPONSIBLE_DISTRICT_NAME, CaseSelectionDto.HEALTH_FACILITY_NAME, CaseSelectionDto.REPORT_DATE, CaseSelectionDto.SEX, CaseSelectionDto.CASE_CLASSIFICATION, CaseSelectionDto.OUTCOME);
if (FacadeProvider.getConfigFacade().isConfiguredCountry(CountryHelper.COUNTRY_CODE_GERMANY)) {
getColumn(CaseSelectionDto.EPID_NUMBER).setHidden(true);
} else {
getColumn(CaseSelectionDto.EXTERNAL_ID).setHidden(true);
}
getColumn(CaseSelectionDto.UUID).setRenderer(new V7UuidRenderer());
getColumn(CaseSelectionDto.AGE_AND_BIRTH_DATE).setConverter(new AgeAndBirthDateDtoConverterV7());
getColumn(CaseSelectionDto.REPORT_DATE).setRenderer(new DateRenderer(DateHelper.getLocalDateTimeFormat(I18nProperties.getUserLanguage())));
for (Column column : getColumns()) {
column.setHeaderCaption(I18nProperties.getPrefixCaption(CaseSelectionDto.I18N_PREFIX, column.getPropertyId().toString(), column.getHeaderCaption()));
}
}
use of com.vaadin.v7.data.util.GeneratedPropertyContainer in project SORMAS-Project by hzi-braunschweig.
the class PersonSelectionGrid method buildGrid.
private void buildGrid() {
setSizeFull();
setSelectionMode(SelectionMode.SINGLE);
setHeightMode(HeightMode.ROW);
BeanItemContainer<SimilarPersonDto> container = new BeanItemContainer<>(SimilarPersonDto.class);
GeneratedPropertyContainer generatedContainer = new GeneratedPropertyContainer(container);
setContainerDataSource(generatedContainer);
setColumns(SimilarPersonDto.class, Arrays.asList(SimilarPersonDto.FIRST_NAME, SimilarPersonDto.LAST_NAME, SimilarPersonDto.NICKNAME, SimilarPersonDto.AGE_AND_BIRTH_DATE, SimilarPersonDto.SEX, SimilarPersonDto.PRESENT_CONDITION, SimilarPersonDto.PHONE, SimilarPersonDto.DISTRICT_NAME, SimilarPersonDto.COMMUNITY_NAME, SimilarPersonDto.POSTAL_CODE, SimilarPersonDto.CITY, SimilarPersonDto.STREET, SimilarPersonDto.HOUSE_NUMBER, SimilarPersonDto.NATIONAL_HEALTH_ID, SimilarPersonDto.PASSPORT_NUMBER));
for (Column column : getColumns()) {
String propertyId = column.getPropertyId().toString();
String i18nPrefix = SimilarPersonDto.getI18nPrefix(propertyId);
column.setHeaderCaption(I18nProperties.getPrefixCaption(i18nPrefix, propertyId, column.getHeaderCaption()));
}
getColumn(SimilarPersonDto.FIRST_NAME).setMinimumWidth(150);
getColumn(SimilarPersonDto.LAST_NAME).setMinimumWidth(150);
}
use of com.vaadin.v7.data.util.GeneratedPropertyContainer in project SORMAS-Project by hzi-braunschweig.
the class EventParticipantSelectionGrid method buildGrid.
private void buildGrid() {
setSizeFull();
setSelectionMode(SelectionMode.SINGLE);
setHeightMode(HeightMode.ROW);
BeanItemContainer<SimilarEventParticipantDto> container = new BeanItemContainer(SimilarEventParticipantDto.class);
GeneratedPropertyContainer generatedContainer = new GeneratedPropertyContainer(container);
setContainerDataSource(generatedContainer);
setColumns();
}
use of com.vaadin.v7.data.util.GeneratedPropertyContainer in project SORMAS-Project by hzi-braunschweig.
the class ContactSelectionGrid method buildGrid.
private void buildGrid() {
setSizeFull();
setSelectionMode(SelectionMode.SINGLE);
setHeightMode(HeightMode.ROW);
BeanItemContainer<SimilarContactDto> container = new BeanItemContainer<>(SimilarContactDto.class);
GeneratedPropertyContainer generatedContainer = new GeneratedPropertyContainer(container);
setContainerDataSource(generatedContainer);
setColumns();
}
use of com.vaadin.v7.data.util.GeneratedPropertyContainer in project SORMAS-Project by hzi-braunschweig.
the class PathogenTestSelectionGrid method buildGrid.
private void buildGrid() {
setSizeFull();
setSelectionMode(SelectionMode.SINGLE);
setHeightMode(HeightMode.ROW);
BeanItemContainer<PathogenTestDto> container = new BeanItemContainer<>(PathogenTestDto.class);
GeneratedPropertyContainer generatedContainer = new GeneratedPropertyContainer(container);
setContainerDataSource(generatedContainer);
setColumns(PathogenTestDto.UUID, PathogenTestDto.TEST_DATE_TIME, PathogenTestDto.TESTED_DISEASE, PathogenTestDto.TEST_TYPE, PathogenTestDto.LAB, PathogenTestDto.TEST_RESULT);
getColumn(PathogenTestDto.UUID).setRenderer(new V7UuidRenderer());
getColumn(PathogenTestDto.TEST_DATE_TIME).setRenderer(new DateRenderer(DateHelper.getLocalDateTimeFormat(I18nProperties.getUserLanguage())));
for (Column column : getColumns()) {
column.setHeaderCaption(I18nProperties.getPrefixCaption(PathogenTestDto.I18N_PREFIX, column.getPropertyId().toString()));
}
}
Aggregations